| Contents | Index |
| On this page… |
|---|
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:
A control file must be stored in a folder that is in the MATLAB path, or the current working folder.
Do not locate a control file within the MATLAB tree, because it could be overwritten by subsequent MATLAB installations.
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.
![]() | Code Generation Control Objects and Methods | Specifying Block Implementations and Parameters in the Control File | ![]() |

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 |