Save Runtime Data from Simulation

Save simulation data to MATLAB® workspace; log signals; export signal, time, output, and state data

Simulation data can include any combination of signal, time, output, state, and data store logging data.

Exporting simulation data involves saving signal values to the MATLAB workspace or to a MAT-file during simulation for later retrieval and postprocessing. Exporting data is also known as data logging or saving simulation data.

For information on the different approaches for exporting signal data, see Export Simulation Data.


Outport Create output port for subsystem or external output
To File Write data to file
To Workspace Write data to MATLAB workspace


Simulink.ModelDataLogs.convertToDataset Convert logging data from Simulink.ModelDataLogs format to Simulink.SimulationData.Dataset format
Simulink.SimulationData.signalLoggingSelector Open Signal Logging Selector
Simulink.SimulationData.updateDatasetFormatLogging Convert model and its referenced models to use Dataset format for signal logging
unpack Extract signal logging objects from signal logs and write them into MATLAB workspace
Simulink.SimulationData.createStructOfTimeseries Create a structure with MATLAB timeseries object leaf nodes
who List names of top-level data logging objects in Simulink data log
whos List names and types of top-level data logging objects in Simulink data log


Simulink.SimulationData.BlockPath Fully specified Simulink block path
Simulink.SimulationData.Dataset Create Simulink.SimulationData.Dataset object
Simulink.SimulationData.Signal Container for signal logging information
Simulink.SimulationData.State State logging element
Simulink.SimulationOutput Access object values of simulation results
Simulink.ModelDataLogs Container for signal data logs of a model
Simulink.SimulationData.LoggingInfo Signal logging override settings
Simulink.SimulationData.ModelLoggingInfo Signal logging override settings for a model
Simulink.SimulationData.SignalLoggingInfo Signal logging override settings for signal
Simulink.SimulationMetadata Access metadata of simulation runs
Simulink.SubsysDataLogs Container for subsystem's signal data logs
Simulink.TimeInfo Provide information about time data in Simulink.Timeseries object
Simulink.Timeseries Store data for any signal except mux or bus signal
Simulink.TsArray Store data for mux or bus signal
Was this topic helpful?