Dataset signal format
Option to specify whether elements of Dataset
object for logged data
store values as timeseries
or timetable
objects
Model Configuration Pane: Data Import/Export
Description
Use this parameter to specify whether logged data is stored within elements of a Simulink.SimulationData.Dataset
object as timeseries
objects or as timetables
.
The value you specify for this parameter affects the way state, time, and output data is logged only when the Format parameter value is Dataset
.
This parameter does not effect data logged for variable-size signals or data logged using
Scope blocks. Logged data for variable-size signals is always stored
in a timetable
that contains a cell array of signal values for each
time step. Configure the format for logged Scope block data using the
block parameters.
The table summarizes a comparison between the timeseries
and
timetable
objects.
Characteristic or Operation | timeseries | timetable |
---|---|---|
Merge logged data | Use the extractTimetable function to extract data for multiple signals into one or more timetable objects that each contain data for one or more signals. | Merge each timetable that contains a single column with data for one signal into a timetable that contains multiple columns, each with data for a different signal. |
View object properties | The ts timeseries Common Properties: Name: '' Time: [1001x1 double] TimeInfo: [1x1 tsdata.timemetadata] Data: [1001x1 double] DataInfo: [1x1 tsdata.datametadata] | Query the properties of the tt.Properties ans = struct with fileds: Description: '' UserData: [] DimensionNames: {'Time' 'Variables'} VariableDescriptions: {} VariableNames: ['temperature' 'WindSpeed' 'WindDirection'] VariableUnits: {} VariableContinuity: ['continuous'] RowTimes: [64x1 duration] |
Access data values | Data values are stored in the output1 = out.yout{1}.Values.Data; | Data values are stored in the output1 = out.yout{1}.Values.Data; |
Multidimensional data access | Time aligns with the last dimension of data logged for states, signals, data stores, and outputs that have two or more dimensions, including row vectors with dimensions Time aligns with the first dimension of data logged for scalar and wide states, signals, data stores, and outputs. | Time always aligns with the first dimension of data logged for states, signals, and outputs. For example, if you log data for a signal that has dimensions 3 -by-2 , each element in the Data property of the timetable has dimensions 1 -by-3 -by-2 . |
Units | Units for logged data are stored in the Logging stores units in the Loading signal data that uses units is supported for | Units for data values are not supported. Time values must be a
|
Identify element as continuous or discrete | The | The |
Check whether time data is evenly spaced | The You can also use the | Use the isregular function to determine whether the time data is evenly spaced. |
View signal name | Signal name stored on object. | Signal name not stored on object. |
Settings
timeseries
(default) | timetable
timeseries
Save
Dataset
element values intimeseries
objects.timetable
Save
Dataset
element values intimetable
objects.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No recommendation |
Safety precaution | No recommendation |
Programmatic Use
Parameter: DatasetSignalFormat |
Type: string | character vector |
Values:
'timeseries' | 'timetable' |
Default: 'timeseries' |
Version History
Introduced in R2017b