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 Run Multiple Simulations.
set_param | Set system and block parameter values |
get_param | Get parameter names and values |
Simulink.BlockDiagram.getInitialState | Return initial state data of block diagram |
Simulink.SimulationInput | Creates SimulationInput objects to make changes to a model for
multiple or individual simulations |
Simulink.SimulationOutput | Access simulation results |
Simulink.SimulationMetadata | Access metadata of simulation runs |
Simulink.op.ModelOperatingPoint | Access simulation operating point data |
Simulation Phases in Dynamic Systems
Discover how the Simulink software simulates a dynamic system.
Based on your simulation needs, select to run your simulation in Normal, Accelerator, and Rapid Accelerator modes.
Simulate a Model Interactively
Start, suspend, and stop a simulation interactively.
Run Simulations Programmatically
Programmatically simulate a model using the sim
function.
Save and Restore Simulation Operating Point
Save and restore the complete simulation snapshot for further simulation.
Specify a pace to slow down simulations.
How Stepping Through a Simulation Works
Learn how simulation snapshots work.
Set Conditional Breakpoints for Stepping a Simulation
Pause simulation using conditional breakpoints.
Display Port Values for Debugging
Display the values of block outputs on the block diagram during simulation.
Learn how you can use operating point with a block, S-functions and model changes.
How Fast Restart Improves Iterative Simulations
Learn when to use fast restart for speeding up simulation.
Configures your model to prepare for fast restart simulation.