Main Content

Simulink.Timeseries

(Not recommended) Access logged signal data

    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.Timeseries object contains the data logged from simulation for a signal along with metadata. Logged data for a mux or bus is stored as a Simulink.TSArray object that contains a Simulink.Timeseries object for each element.

    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.

    The structure of the Simulink.ModelDataLogs object reflects the structure of the model.

    • One or more Simulink.Timeseries objects contain data for one or more signals logged in the model the ModelDataLogs object represents.

    • One or more Simulink.TSArray objects contain the Simulink.Timeseries and Simulink.TSArray objects for one or more muxes or buses logged in the model the ModelDataLogs object represents.

    • One or more Simulink.SubsysDataLogs objects contain the Simulink.Timeseries, Simulink.TSArray, Simulink.SubsysDataLogs, and Simulink.ModelDataLogs objects for data logged inside subsystems in the model the ModelDataLogs object represents.

    • One or more Simulink.ModelDataLogs objects contain the Simulink.Timeseries, Simulink.TSArray, Simulink.SubsysDataLogs, and Simulink.ModelDataLogs objects for data logged inside model references in the model the ModelDataLogs object represents.

    Properties

    expand all

    Name for logged signal data, specified as a character vector.

    Path to block that produces signal in model, specified as a character vector.

    Index of port on block that produces signal in model, specified as an integer.

    Name of signal in model, specified as a character vector

    Name of parent for mux or bus element, specified as a character vector. For a signal that is not part of a mux or bus, the ParentName property is the same as the SignalName property.

    Time metadata, specified as a Simulink.TimeInfo object.

    Logged time values, specified as an array.

    Logged signal values, specified as an array.

    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.