export
R2026bExport run or signal from the Simulation Data Inspector to workspace or file
Syntax
Description
exports the data for one or more signals in the Simulation Data Inspector to the workspace.data = export(sig)
If
sigis a scalarSimulink.sdi.Signalobject, thendatais atimeseriesobject.If
sigis an array ofSimulink.sdi.Signalobjects, thendatais aSimulink.SimulationData.Datasetobject that contains aSimulink.SimulationData.Signalobject for each signal in the input array.
exports the data = export(runObj)Simulink.sdi.Run object runObj to
the base workspace as a Simulink.SimulationData.Dataset
object. If you do not have a Simulink.sdi.Run
object, you can either create one or use the run ID with Simulink.sdi.exportRun
instead.
export(___,
exports data to the workspace or a file according to the options specified by one or
more name-value arguments.Name=Value)
For most signals, you can use name-value arguments to specify whether to export the data to the workspace, a MAT file, a Microsoft® Excel® file, an MLDATX file, a Parquet file (since R2026a), CSV file (since R2026b), or a VCD file (since R2026b). When the signal contains video data, you can export the signal to an MP4 file. Exporting a video signal to an MP4 file is not supported for Linux® operating systems.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Alternatives
To export data from multiple runs:
Interactively export the data from the Simulation Data Inspector. For more information, see Save and Share Simulation Data Inspector Data and Views.