Main Content

Run Individual Simulations

Run and control individual simulations directly from the Simulink® Editor or programmatically from the MATLAB® command prompt

Simulating a model gives you results of the algorithms that you build through the process of modeling. You can interact with the simulations by pacing the simulation, tuning model parameters, stopping or pausing the simulation, and displaying port values to evaluate the design of your model. Simulations help you understand the design and behavior of your model.

Simulate a model by clicking the Run button on the Simulink Editor, or entering simulation commands, for example, sim and set_param in the MATLAB Command Window or a MATLAB file.

To learn about multiple simulations, see Running Multiple Simulations.

Functions

simSimulate a Simulink model
parsimSimulate dynamic system multiple times in parallel or serial
set_paramSet system and block parameter values
get_paramGet parameter names and values
Simulink.BlockDiagram.getInitialStateReturn initial state data of block diagram

Classes

Simulink.SimulationInputCreates SimulationInput objects to make changes to a model for multiple or individual simulations
Simulink.SimulationOutputAccess simulation results
Simulink.SimulationMetadataAccess metadata of simulation runs
Simulink.op.ModelOperatingPointComplete information that represents model operating point in simulation

Topics

Run Basic Simulations

Analyze Simulations

Perform Iterative Simulations With Fast Restart