Main Content

Simulink.sdi.getAutoTimespan

Get behavior of time span in Simulation Data Inspector

Since R2022b

    Description

    example

    autoTimespan = Simulink.sdi.getAutoTimespan returns the behavior of the Time span in the Simulation Data Inspector. When autoTimespan is 1, Time span is set to auto, and the t-axis spans the full simulation time. When autoTimespan is 0, Time span is a numeric value that determines the size of the visible time interval.

    Examples

    collapse all

    Before simulating a model, you can use the Simulink.sdi.getAutoTimespan function to determine if the Simulation Data Inspector is generating the time span automatically based on the simulation time or if the time span is determined by a numeric value for Time span.

    autoTimespan = Simulink.sdi.getAutoTimespan
    autoTimespan =
    
      logical
    
       0

    Output Arguments

    collapse all

    Time span mode, returned as 0 (false) or 1 (true).

    • 0 (false)Time span is a numeric value that determines the size of the visible t-axis.

    • 1 (true)Time span is auto and the t-axis spans the full simulation time.

    Version History

    Introduced in R2022b