This example shows how to step forward and back through a simulation.
At the MATLAB® prompt, type
vdp
In the Simulink® Editor for the vdp
model, click to open the Simulation Stepping Options
dialog box.
In the dialog box, select the Enable stepping back check box, and then click OK.
On the Simulation tab, click the Step
Forward button one time.
The simulation simulates one step, and the software stores a simulation snapshot for that step.
Click the Step Forward button again to step forward again and store simulation data. A total of 25 forward steps produces these simulation results:
You must step forward to create the simulation state that the step backward operation requires. This means you must first step forward before you can step backward through the same steps.
On the Simulation tab, click the Step
Back button four times to step backward to the
simulation snapshot shown below.