saveToSource
Save model workspace changes to the external data source of the model workspace
Syntax
Description
saveToSource(
saves the variables
in the model workspace represented by the mdlWks
)Simulink.ModelWorkspace
object mdlWks
to the MAT-file or script file specified by the
FileName
property of the model workspace.
When you set the DataSource
property of the model workspace
to 'MAT-File'
or 'MATLAB File'
, the
FileName
property specifies the name of the file that acts
as the external data source of the workspace. As you make changes to the variables
in the model workspace, use saveToSource
to permanently save
the changes in the external data source.
If an object loaded into the model workspace uses a Simulink.CoderInfo
object to
specify code generation settings, Simulink® removes the Simulink.CoderInfo
object and saves the
information in the code mapping object for the model.
Examples
Input Arguments
Version History
Introduced before R2006a