You can simulate a model at any time by clicking the Run button on the Simulink® Editor.
The simulation runs from the start time to the stop time specified in the model configuration. While the simulation is running, you can interact with the simulation, tune parameters, stop or pause the simulation, and launch simulations of other models.
If an error occurs during simulation, simulation stops, and the Diagnostic Viewer opens to help you determine the cause of the error.
For more information on starting and stopping simulations, see Simulate a Model Interactively.
How to start, suspend, and stop a simulation interactively.
This example shows how to step forward and back through a simulation.
A conditional breakpoint is triggered based on a specified expression evaluated on a signal.
When you need to simulate a model iteratively to tune parameters, achieve a desired response, or automate testing, use fast restart to avoid compiling again.
Before you simulate a model in fast restart, ensure that the model meets these requirements:
After you load your model and turn on fast restart, simulate the model.
How the Simulink software simulates a dynamic system.
How to select the optimal solver for simulating a model.
A variable-step solver dynamically adjusts the time step size, causing it to increase when a variable is changing slowly and to decrease when the variable changes rapidly.
In a Simulink model, an algebraic loop occurs when a signal loop exists with only direct feedthrough blocks within the loop.
How to choose between Normal, Accelerator, and Rapid Accelerator modes
How to save and restore the complete simulation state for further simulation.
Learn about the Simulation Stepper.
These topics explain how Simulation Stepper steps through a simulation.
You run Simulation Stepper and access the settings from the Simulink Editor toolbar .
There is no command-line interface for Simulation Stepper.
Parameters for controlling simulation stepping.
In the classic Simulink workflow, when you simulate a model, Simulink:While developing a model, you typically simulate a model repeatedly as you iterate the design.
When you click Stop in the middle of a fast restart simulation:
You can use fast restart in Normal and Accelerator simulation modes.
There are some limitations to simulating in fast restart.