Interactive Simulation

Run simulation from model, view live results, interact with simulation

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.

Examples and How To

Run Simulation

Simulate a Model Interactively

How to start, suspend, and stop a simulation interactively.

Step Through Simulation

Step Through a Simulation

This example shows how to step forward and back through a simulation.

Set Conditional Breakpoints for Stepping a Simulation

A conditional breakpoint is triggered based on a specified expression evaluated on a signal.

Perform Iterative Simulations with Fast Restart

Fast Restart Workflow

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.

Get Started with Fast Restart

Before you simulate a model in fast restart, ensure that the model meets these requirements:

Simulate a Model Using Fast Restart

After you load your model and turn on fast restart, simulate the model.


Simulate Dynamic Systems

Simulation Phases in Dynamic Systems

How the Simulink software simulates a dynamic system.


How to select the optimal solver for simulating a model.

Zero-Crossing Detection

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.

Algebraic Loops

In a Simulink model, an algebraic loop occurs when a signal loop exists with only direct feedthrough blocks within the loop.

Choosing a Simulation Mode

How to choose between Normal, Accelerator, and Rapid Accelerator modes

Save Simulation

Save and Restore Simulation State as SimState

How to save and restore the complete simulation state for further simulation.

Step Through Simulation

How Simulation Stepper Helps With Model Analysis

Learn about the Simulation Stepper.

How Stepping Through a Simulation Works

These topics explain how Simulation Stepper steps through a simulation.

Use Simulation Stepper

You run Simulation Stepper and access the settings from the Simulink Editor toolbar .

Simulation Stepper Limitations

There is no command-line interface for Simulation Stepper.

Simulation Stepping Options

Parameters for controlling simulation stepping.

Perform Iterative Simulations with Fast Restart

How Fast Restart Improves Iterative Simulations

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.

Stop Simulation and Exit Fast Restart

When you click Stop in the middle of a fast restart simulation:

Fast Restart Methodology

You can use fast restart in Normal and Accelerator simulation modes.

Factors Affecting Fast Restart

There are some limitations to simulating in fast restart.

Was this topic helpful?