Main Content

sfsave

Save Simulink model

Description

example

sfsave saves the current model in the current folder. The current folder must be writable.

example

sfsave modelName saves the specified model in the current folder. The specified model must be open and the current folder must be writable.

example

sfsave modelName newModelName saves the specified model using a new model name. The specified model must be open and the current folder must be writable.

example

sfsave(___) enables you to specify the input arguments in the previous syntaxes by using variables or strings. For example, you can enter sfsave(var1,var2) where var1 is a variable set to "OldModel" and var2 is a variable set to "NewModel".

Examples

collapse all

Save the model that is currently open.

sfsave

Save an open model called MyModel.

sfsave MyModel

Save a model called MyModel using the name MyNewModel.

sfsave MyModel MyNewModel

Save the model whose name is specified by the variable model.

model = "MyModel";
sfsave(model)

Input Arguments

collapse all

Name of the Simulink® model, specified as a string scalar or character vector. To specify the name of the model using a variable or a string, call sfnew with its input arguments enclosed in parentheses.

Example: sfsave MyModel

Example: sfsave("MyModel")

Data Types: char | string

Name of the new Simulink model, specified as a string scalar or character vector. To specify the name of the new model using a variable or a string, call sfnew with its input arguments enclosed in parentheses.

Example: sfsave MyModel MyNewModel

Example: sfsave("MyModel","MyNewModel")

Data Types: char | string

Version History

Introduced before R2006a