Using Simulink Previous page   Next Page

Inlining Parameters

As an optimization, you can specify that some or all of a model's tunable parameters be nontunable. Declaring parameters as nontunable allows the Real-Time Workshop to include the parameters as constants in code generated from the model, an optimization known as inlining parameters. To inline all of a model's parameters, select the Inline parameters option on the Optimization pane of the model's active configuration set.

To inline some but not all of a model's parameters, you must first declare all of the parameters as inlined by selecting the Inline parameters option on the active set's Optimization pane. You must then specify the exceptions, using either the Model Parameter Configuration dialog box (see Model Parameter Configuration Dialog Box) or Simulink.Parameter objects.

Using Parameter Objects to Specify Parameter Tunability

To declare a parameter to be tunable even when the Inline parameters option is set, use an instance of Simulink.Parameter class to specify the parameter's value and set the parameter object's RTWInfo.StorageClass property to any value but 'Auto' (the default).

If you set the RTWInfo.StorageClass property to any value other than Auto, you should not include the parameter in the tunable parameters table in the model's Model Parameter Configuration dialog box.


Previous page  Working with Tunable Parameters Block Properties Dialog Box Next page

© 1994-2005 The MathWorks, Inc.