Log Dataset data to file

Description

Log simulation data saved using the Dataset format to a MAT-file.

Category: Data Import/Export

Settings

Default: 'off'

On

Enables logging data saved using the Dataset 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.

Off

Disables logging simulation data to a MAT-file.

Tips

  • To use the Log Dataset data to file option, 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 the Format parameter to Dataset.

    If you select the Final states parameter, clear the Save final operating point parameter.

  • When the data in the MAT-file fits into memory, use the load 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 using Simulink.SimulationData.DatasetRef and matlab.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, see Save Logged Data from Successive Simulations.

Dependencies

Select the Log Dataset data to file check box before entering the path to the MAT-file for logging.

Command-Line Information

Parameter: LoggingToFile
Value: 'on' | 'off'
Default: 'off'
Parameter: LoggingFileName
Value: valid path and file name
Default: 'out.mat'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
Efficiency

No recommendation

Safety precaution

No recommendation

See Also

| |

Related Topics