Log simulation data saved using theDataset
format to a MAT-file.
Category:Data Import/Export
Default:'off'
Enables logging data saved using theDataset
format to a MAT-file.
Log simulation data to a MAT-file when you know prior to simulation that you want to save the results in a file.
Specify the path and file name for the MAT-file.
Disables logging simulation data to a MAT-file.
To use theLog Dataset data to fileoption, select one or more of these types of data to log:
States
Final states
Signal logging
Output
Data stores
Stateflow®states and data
If you are logging states or output data, set theFormatparameter toDataset
.
If you select theFinal statesparameter, clear theSave final operating pointparameter.
When the data in the MAT-file fits into memory, use theload
function to access the data.
When the data in the MAT-file is too large to fit into memory, access the data in the MAT-file usingSimulink.SimulationData.DatasetRef
andmatlab.io.datastore.SimulationDatastore
objects.
Except for parallel simulations, Simulink®overwrites the contents of the MAT-file during each simulation unless you change the name of the file between simulations. For details, seeSave Logged Data from Successive Simulations.
Select theLog Dataset data to filecheck box before entering the path to the MAT-file for logging.
Parameter:LoggingToFile |
Value:'on' |'off' |
Default:'off' |
Parameter:LoggingFileName |
Value:valid path and file name |
Default:'out.mat' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No recommendation |
Safety precaution | No recommendation |
Simulink.SimulationData.DatasetRef
|Simulink.SimulationData.Dataset
|load