Tunable Parameters

About Tunable Parameters

Simulink® lets you change the values of many block parameters during simulation. Such parameters are called tunable parameters. In general, only parameters that represent mathematical variables, such as the Gain parameter of the Gain block, are tunable. Parameters that specify the appearance or structure of a block, e.g., the number of inputs of a Sum block, or when it is evaluated, e.g., a block's sample time or priority, are not tunable.

You can tell whether a particular parameter is tunable by examining its edit control in the block's dialog box or Model Explorer during simulation. If the control is disabled, the parameter is nontunable. You cannot tune inline parameters. For more information, see Inline Parameters.

Tune a Block Parameter

You can use a block dialog box or Model Explorer to modify the tunable parameters of any block. To use the block parameter dialog box:

  1. Open the block parameter dialog box.

  2. Change the parameter value displayed in the dialog box.

  3. Click OK or Apply.

You can also tune a parameter at the MATLAB® command line, using either the set_param command or by assigning a new value to the MATLAB workspace variable that specifies the parameter's value. You must update the model's block diagram for the change to take effect (see Update a Block Diagram).

Specify Ranges for Tunable Parameters

It is a best practice to specify the minimum and maximum values that you expect to use while tuning a parameter.

To specify parameter value ranges, see Specify Ranges for Parameters.

Was this topic helpful?