Main Content

Multiple Simulations

Run multiple simulations from the Simulink Editor

Since R2021b

Description

The Multiple Simulations panel allows you to set up multiple simulations for a block parameter that you want to vary, for example, for a parameter sweep, or for Monte Carlo simulations. You can select a block parameter in the model canvas and specify values that you want to use for the simulations. You can also specify variables for the simulations. With the Multiple Simulations panel, you can provide configurations such as Use Parallel to run your simulations in parallel. To run the simulations that you have set up, first, select the design study, and then in the Simulink® Toolstrip, on the Simulation tab, click the Run All button. Once the simulations are complete, you can view and manage the results in the Simulation Manager.

Screenshot of the Multiple Simulations Panel. The panel has two sections: one - to create a design study, and two: to specify simulation parameters

Open the Multiple Simulations

  • To open the Multiple Simulations panel, navigate to the Prepare section on the Simulink toolstrip. In the Inputs & Parameter Tuning section, click Multiple Simulations Icon of Multiple Simulations.

Parameters

expand all

Option to start a new design study file or a new Multiple Simulations panel session. New design study file or a session. Creating a new design study file prompts you to create a new session and confirms if you want to save and close the current session.

Option to add a new design study in the current, open MLDATX file. green plus icon adds a new design study field to the existing table of design studies in the Multiple Simulations panel.

Option to add different parameters and values, sets of faults, or any combination of parameters and values, sets of defaults, and variables for multiple simulations.

  • To add a new block parameter, click Icon to add block parameter icon.

  • To add new variables, click Icon to add new variables.

  • For the block parameters or variables that you add, you can use parameter combinations. Parameter combinations allow you to specify either an exhaustive combination or a sequential combination of the parameters. By default, all parameters at the top level are combined exhaustively.

  • To add a set of fault values, click Icon to add a new set of faults

Select the Use Parallel to run the multiple simulations on parallel workers. This option is only available with a Parallel Computing Toolbox™ license.

Programmatic Use

expand all

parsim(in) is the command line equivalent syntax for running multiple simulations.

More About

expand all

Version History

Introduced in R2021b