| Simulink® | ![]() |
| On this page… |
|---|
Due to the constraints described in Inline Parameter Requirements, you cannot use the Model Parameter Configuration Dialog Box to tune parameters in referenced models.
Simulink® provides three other techniques that you can use to parameterize referenced models:
Global Nontunable Parameters
Global Tunable Parameters
Model Arguments
You cannot parameterize a referenced model by using symbols that match definitions on the workspace of
A global nontunable parameter is a MATLAB® variable or a Simulink.Parameter object whose storage class is auto. The parameter can exist on the MATLAB workspace or any model workspace visible to all referenced models that use the parameter.
Using a global nontunable parameter in a referenced model allows you to control the behavior of the referenced model by setting the parameter value before simulation begins. All instances of the model use the same value. You cannot change the value during simulation, but you can change it between one simulation and the next. The change requires rebuilding the model in which the change occurs, but not any models that it references. See Specifying Numeric Parameter Values for details.
A global tunable parameter is a Simulink.Parameter object whose storage class is other than auto. The parameter exists on the MATLAB workspace.
Using a global tunable parameter in a referenced model allows you to control the behavior of the referenced model by setting the parameter value. All instances of the model use the same value. You can change the value during simulation or between one simulation and the next. The change does not requires rebuilding the model in which the change occurs, or any models that it references. See Changing the Values of Block Parameters During Simulation for details.
If you want to reference an existing model that uses tunable parameters defined with the Model Parameter Configuration Dialog Box, you must change the model to implement tunability in some other way. To facilitate this task, Simulink provides a command that converts tunable parameters specified in the Model Parameter Configuration dialog box to global tunable parameters. See tunablevars2parameterobjects for details.
You can also use model arguments to specify different behavior for different references to the same model. This is the only technique that lets you specify different behaviors for different instances of the same model. See Using Model Arguments for details.
![]() | Simulink® Model Referencing Requirements | Using Model Arguments | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |