Simulation Stepping Options

Simulation Stepping Options Overview

Use the Simulation Stepping Options dialog box to configure the time and the manner of manually stepping through a simulation.

Configuration

This pane appears when you select Simulation > Stepping Options.

  1. Set the time at which you wish to pause the simulation

  2. To step backwards through a simulation, select Enable stepping back and specify the total number and frequency of snapshots.

  3. Specify the increment of steps by which the simulation steps either forward or backwards.

  4. To pause simulation at a particular time, select Pause simulation when time reaches check box and enter the pause time.

Tips

  • To start the Simulation Stepping Options dialog box from the Simulink® toolbar, click .

  • You can change the value while the simulation is running or paused.

See Also

Enable stepping back

Enable stepping back.

Settings

Default: Off

On

Enable stepping back.

Off

Disable stepping back.

Tip

Simulation stepping (forward and back) is available only for Normal and Accelerator modes.

Dependencies

This parameter enables the Maximum number of saved back steps and Interval between stored back steps parameters.

See Also

How Simulation Stepper Helps With Model Analysis

Maximum number of saved back steps

Enter the maximum number of snapshots that the software can capture. A snapshot at a particular simulation time captures all the information required to continue a simulation from that point.

Settings

Default: 10

Minimum: 0

Dependencies

Enable stepping back enables this parameter and the Interval between stored back steps parameter.

See Also

Interval between stored back steps

Enter the number of major time steps to take between capturing simulation snapshots.

Settings

Default: 10

Minimum: 1

Tip

The number of steps to skip between snapshots. This parameter enables you to save snapshots of simulation state for stepping backward at periodic intervals, such as every three steps forward. This interval is independent of the number of steps taken in either the forward or backward direction. Because taking simulation snapshots affects simulation speed, saving snapshots less often can improve simulation speed.

Dependencies

Enable stepping back enables this parameter and the Maximum number of saved back steps parameter.

See Also

Move back/forward by

Enter the number of major time steps for a single call to step forward or back.

Settings

Default: 1

Minimum: 1

Tip

The maximum number of steps, or snapshots, to capture while simulating forward. The greater the number, the more memory the simulation occupies and the longer the simulation takes to run.

See Also

Pause simulation when time reaches

Pause simulation when time reaches the specified time(s).

Settings

Default: Off

On

Enable stepping back.

Off

Disable stepping back.

Selecting this check box enables the associated text box. In this text box, enter the time at which simulation is to be paused.

Default: 5

Minimum: 0

  • This value can be a scalar value, or a vector of times. Specifying a vector of pause times is equivalent to specifying multiple separate pause times for a single simulation.

    You can specify pause times as variables in the model or MATLAB® workspace.

  • The stepper does not alter the course of the simulation. As a consequence, specifying a value for a pause time does not necessarily pause the simulation at exactly that time. Instead, the simulation pauses at whatever simulation time is closest to the requested pause time, without going below it.

See Also

How Simulation Stepper Helps With Model Analysis