Documentation

convertToSLDataset

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

Syntax

success=convertToSLDataset(source,destination)
success=convertToSLDataset(source,destination,datasetname)

Description

example

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.

Examples

collapse all

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

success=convertToSLDataset('file1.mat','file2.mat')

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

success=convertToSLDataset('file1.mat','file2.mat','myDataset')

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

Was this topic helpful?