Skip to Main Content Skip to Search
Product Documentation

Using Control Files in the Code Generation Process

Where to Locate Your Control Files

Before you create a control file or use a control file in code generation, be sure to observe the following requirements for the location of control files:

Making Your Control Files More Portable

It can be advantageous to code your control files so that they are independent of any particular model name. To do this, use the period (.) to represent the root-level model at the beginning of all modelscope paths. For example:

cfg.forEach( './Subsystem/MinMax', ... 
   'built-in/MinMax', {}, ... 
   'Cascade');

If you code modelscopes in this way, all modelscopes are interpreted as references to the current model, rather than as references to an explicitly named model. Therefore, you can save your model under a different name, and all references to the root-level model will be valid.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS