Format
Description
Specify data format for logging states, output, and final states data.
Category:Data Import/Export
Settings
Default:Dataset
-
Dataset
-
Logged states and outputs are each stored in a
Simulink.SimulationData.Dataset
object. EachDataset
object contains an element for each individual state or output. The data for each state or output is stored in atimeseries
object by default except variable-size signal data. Variable-size signal data is always stored in atimetable
object that contains a cell array of signal values for each time step. -
Array
-
Logged data is stored in a matrix. Each row in the matrix corresponds to a simulation time step, and each column corresponds to a state or output. The order of the states and outputs in the matrix depends on the block sorted order, which can change from one simulation to the next. Do not use
Array
format to log bus data. -
Structure
-
State and output data each log to a structure. The states structure contains a structure for each block in the model that has a state. The outputs structure contains a structure for each root-levelOutportblock in the model.
-
Structure with time
-
The data logs to a structure with a time field and a signals field. The time field contains a vector of simulation times. The signals field contains the same data as the
Structure
format.
Tips
When you log states and output data using
Dataset
:你可以在MATL处理记录数据AB®without a Simulink®license.
Logging supports saving multiple data values for a given time step, which can be required for logging data in aFor Iterator Subsystem, aWhile Iterator Subsystem, and Stateflow®.
Logged data automatically streams to theSimulation Data Inspectorduring simulation.
You can log variable-size signals using root-levelOutportblocks.
Dataset
format does not support:Code generation.
Logging states inside a function-call subsystem.
Logging states during rapid accelerator simulations.
To use
Array
format, all logged states and outputs must be:All scalars or all vectors (or all matrices for states)
All real or all complex
The same data type
Use another format if the outputs and states in your model do not meet these conditions.
The format specified for theFormatparameter does not apply to final states data.
Command-Line Information
Parameter:SaveFormat |
Value:'Array' |'Structure' |'StructureWithTime' |'Dataset' |
Default:'Dataset' |
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No recommendation |
Safety precaution | No recommendation |