Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

Parameter Tuning by Using MATLAB Commands

When parameters are MATLAB workspace variables, the Model Parameter Configuration dialog box is the recommended way to see or set the attributes of tunable parameters. In addition to that dialog box, you can also use MATLAB get_param and set_param commands.

The following commands return the tunable parameters and/or their attributes:

The following commands declare tunable parameters or set their attributes:

The following example declares the variable k1 to be tunable, with storage class ExportedGlobal and type qualifier const. The number of variables and number of specified storage class settings must match. If you specify multiple variables and storage class settings, separate them with a comma.

set_param(gcs, 'TunableVars', 'k1')
set_param(gcs, 'TunableVarsStorageClass','ExportedGlobal')
set_param(gcs, 'TunableVarsTypeQualifier','const')

Other configuration parameters you can get and set are listed in Configuration Parameters for Simulink Models in the Real-Time Workshop Reference.

  


Related Products & Applications

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

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