Set Model Configuration Parameters for a Model
Model configuration parameters determine how your model runs by specifying the type of
solver used, import and export settings, and other settings that control model behavior.
Every model has a configuration set that contains the model
configuration parameters and their specified values. When you create a new model, it
contains the default configuration set, called Configuration
, that
specifies the default values for the model configuration parameters. You can view and set
configuration parameters programmatically or by using the Configuration Parameters dialog
box.
For more information about each parameter, see the links in Configuration Panes.
Set Configuration Parameters Programmatically
To interact with model configuration parameters programmatically, use the get_param
and set_param
functions. For example, you
can get and set the Solver type parameter for the model
vdp
.
openExample('simulink_general/VanDerPolOscillatorExample'); get_param('vdp', 'SolverType') ans = 'Variable-step'
set_param('vdp', 'SolverType', 'Fixed-step');
To programmatically change configuration parameter values in a configuration set stored in a data dictionary, see Manage Configuration Set Stored in Data Dictionary.
Set Configuration Parameters by Using the Dialog Box
To view and set the configuration parameters for your model, open the Configuration Parameters dialog box. In the Simulink® Editor, on the Modeling tab, click Model Settings.
Alternatively, to open the Configuration Parameters dialog box for a referenced model, click the Model Settings button arrow. Then, in the Referenced Model section, select Model Settings.
The Configuration Parameters dialog box opens and shows the configuration parameters for the model.
Use the dialog box to view and set the parameters. If you cannot change the value of a parameter, the parameter is disabled for one of these reasons:
The parameter has a dependency on another parameter. In this case, the parameter becomes enabled or disabled depending on the setting of the other parameter. To enable a parameter that has a dependency, see the complete documentation for that parameter.
The configuration is a configuration reference. In this case, all of the parameters are disabled in the dialog box. To change the parameter values in the referenced configuration, see Change Parameter Values in a Referenced Configuration Set.
To get more information about a parameter, right-click the parameter name and select What's This? A dialog opens and displays:
A short parameter description.
The parameter name that you can use in scripts.
Parameter dependencies.
From the What's This? dialog box, click Show more information for the complete parameter documentation.
To find a parameter by using its name, command-line name, value, or description, use
the Search box at the top of the dialog box. The search tool
supports regular expressions. Type .
in the search box to see a list
of all parameters.
Configuration Panes
The configuration set is organized in panes that contain parameters related to that category. To display the parameters for a specific category, click the associated pane in the tree on the left side of the dialog box. You can access the advanced parameters for each pane by mousing over the ellipsis toward the bottom of the dialog box and clicking Advanced parameters.
For more information about the parameters on each of the panes, see:
Some MathWorks® products that work with Simulink define additional parameters. If such a product is installed on your system, the configuration set also contains the associated configuration parameters and panes.
Simulink Coder™ — Model Configuration Parameters: Code Generation (Simulink Coder)
HDL Coder™ — Model Configuration Parameters: HDL Code Generation (HDL Coder)
Simulink PLC Coder™ — PLC Coder: General Tab Overview (Simulink PLC Coder)
Simulink Coverage™ — Specify Coverage Options (Simulink Coverage)
Simulink Real-Time™ — Simulink Real-Time Options Pane (Simulink Real-Time)
Simulink Desktop Real-Time™ — Simulink Desktop Real-Time Pane (Simulink Desktop Real-Time)
Simscape™ — Model Configuration Parameters: Simscape (Simscape)
Simulink Design Verifier™ — Design Verifier Pane (Simulink Design Verifier)