Main Content

Simulink.sdi.setAutoTimespan

Specify behavior of time span in Simulation Data Inspector

Since R2022b

    Description

    Simulink.sdi.setAutoTimespan(autoTimespan) sets the behavior of the Time span in the Simulation Data Inspector. When autoTimespan is specified as true or 1, Time span is set to auto, and the t-axis spans the full simulation time. When autoTimespan is specified as false or 0, Time span is a numeric value that determines the size of the visible time interval.

    Note

    The simulation time must be finite to set the Time span to auto.

    example

    Examples

    collapse all

    Before beginning a simulation, you can use the Simulink.sdi.setAutoTimespan function to set the Time span to auto. When the time span is determined automatically, the t-axis spans the full simulation time.

    Simulink.sdi.setAutoTimespan(true)

    Input Arguments

    collapse all

    Time span mode, specified as a numeric or logical 0 (false) or 1 (true).

    • falseTime span is a numeric value that determines the size of the visible t-axis.

    • trueTime span is auto, and the t-axis spans the full simulation time.

    Version History

    Introduced in R2022b