Main Content

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');
For more information on how to use configuration parameters programmatically, see Automate Model Configuration by Using a Script.

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.

Toolstrip showing the Modeling tab. The cursor is pointing to the Model Settings button.

The Configuration Parameters dialog box opens and shows the configuration parameters for the model.

Configuration parameters dialog box showing the data import/export pane.

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.

Related Topics