Main Content

step

Advance simulation by specified increment

Description

step advances the simulation to the next method in the current time step.

Note

This function is supported only for simulation debugging sessions started programmatically using the sldebug function or using the sim function with the 'debug' name-value argument.

step amt advances the simulation by the amount specified by amt. For example, to advance the simulation to the first method in the next time step, specify amt as top.

step top

Input Arguments

collapse all

Amount to advance simulation, specified as one of these options:

  • in — Advance simulation to the next method in the current time step and pause before the first method within the next method. If the next method does not contain any methods, the simulation debugging session pauses at the end of the next method.

  • over — Advance simulation over the next method in the current time step.

  • out — Advance simulation to the end of the current simulation point in the execution hierarchy.

  • top — Advance simulation to the first method in the next time step.

  • blkmth — Advance simulation to next block method.

Example: step top advances the simulation debugging session to the first method in the next time step.

Data Types: char | string

Tips

After executing a block method in a programmatic simulation debugging session, the software displays this information in the MATLAB® Command Window:

  • Current simulation time Tm

  • Block ID

  • Next method to execute

  • Block input values U1,...,Un

  • Block output values Y1,...,Yn

  • Block continuous state vector CSTATE

  • Block discrete state vector DSTATE

The image shows typical Command Window output after calling the step function.

Version History

Introduced in R2007a