Main Content

Simulink.TimeInfo

(Not recommended) Metadata for time data in Simulink.Timeseries object

    The ability to log and load data using the ModelDataLogs format has been removed. Use another supported format, such as Dataset format, instead. For more information, see Compatibility Considerations.

    Description

    The Simulink.TimeInfo object contains metadata for the time data in a Simulink.Timeseries object, including the units and the start and stop times.

    Creation

    Prior to R2016a, you could configure a model to log data using the ModelDataLogs format. Simulating a model with the Signal logging format parameter set to ModelDataLogs created a Simulink.ModelDataLogs object that contained the data for all logged signals. You could specify the name for the ModelDataLogs object using the Signal logging name parameter.

    A ModelDataLogs object contains a Simulink.Timeseries object for each logged signal, mux element, and bus element in a model. Each Simulink.Timeseries object contains a Simulink.TimeInfo object.

    Properties

    expand all

    Time data units, specified as a character vector.

    Example: 'seconds'

    Start time for time data, specified as a scalar or an array.

    • For a signal that is not in a conditionally executed subsystem, the value is a scalar that matches the start time for the simulation that produced the Simulink.Timeseries object.

    • For a signal inside a conditionally executed subsystem, the value is an array that contains the times at which the subsystem became active.

    End time for time data, specified as a scalar or an array.

    • For a signal that is not in a conditionally executed subsystem, the value is a scalar that matches the end time for the simulation that produced the Simulink.Timeseries object.

    • For a signal inside a conditionally executed subsystem, the value is an array that contains the times at which the subsystem became inactive.

    Sample rate, returned as NaN or a scalar.

    • The value is NaN for signals with continuous sample time logged in simulations that use a variable-step solver.

    • The value is a scalar for a signal with a discrete sample time and signals logged in simulations that use a fixed-step solver.

    This property is read-only.

    Length of time data vector, specified as an integer. The length of the vector indicates the number of samples logged from simulation.

    Version History

    Introduced before R2006a

    expand all

    R2022b: Loading data saved in the ModelDataLogs format no longer supported

    Starting in R2022b, you can no longer load data stored in the ModelDataLogs format, including data stored in Simulink.Timeseries, Simulink.TSArray, and Simulink.SubsysDataLogs objects.

    You can convert data stored in the ModelDataLogs format to the Dataset format. For more information, see Convert Data to Dataset Format.