This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Convert contents of MAT-file to Simulink.SimulationData.Dataset object





success=convertToSLDataset(source,destination) converts the contents of a MAT-file (source) to a destination MAT-file (destination).

success=convertToSLDataset(source,destination,datasetname) names the dataset datasetname.

When converting structure signal data, the function names the signal using the value contained in the label field of the structure signal field, such as: mySignal.signal(1).label.

This function ignores time expressions in source.


collapse all

Save signals from file1.mat to a dataset named file1 in file2.mat.


Save signals from file1.mat to a dataset named myDataset in file2.mat.


Input Arguments

collapse all

MAT–file that contains Simulink® inputs.

MAT–file to contain Simulink.SimulationData.Dataset converted from contents of source.

Data set name for new Simulink.SimulationData.Dataset object.

Output Arguments

collapse all

Outcome of conversion, specified as binary:

  • 1

    Conversion is successful.

  • 0

    Conversion is not successful.

Introduced in R2016a