Simulink Reference Previous page   Next Page
save_system

Save a Simulink system

Syntax

Description

save_system saves the current top-level system to a file with its current name.

save_system('sys') saves the specified top-level system to a file with its current name. The system must be open.

save_system('sys', 'newname') saves the specified top-level system to a file with the specified new name. The new name can be a file name, in which case Simulink saves the system in the working directory, or a fully qualified pathname. On UNIX, the fully qualified pathname can start with a tilde (~), signifying your home directory. The system to be saved must be open.

save_system('sys', 'newname', 'BreakLinks') saves the specified top-level system to a file with the specified new name, replacing links to library blocks with copies of the library blocks in the saved file.

save_system('sys', 'newname', 'SaveModelWorkspace') saves the specified top-level system to a file with the specified new name. If the model workspace DataSource is a MAT-file, this command also saves the contents of the model workspace. 'SaveModelWorkspace' is most useful when DataSource is a MAT-file.

save_system('sys', 'newname', 'BreakLinks', 'SaveModelWorkspace') saves the specified top-level system to a file with the specified new name, replacing links to library blocks with copies of the library blocks in the saved file. If the model workspace DataSource is a MAT-file, this command also saves the contents of the model workspace. 'SaveModelWorkspace' is most useful when DataSource is a MAT-file. The positions of 'BreakLinks' and 'SaveModelWorkspace' are interchangeable.

Example

This command saves the current system.

This command saves the vdp system.

This command saves the vdp system to a file with the name 'myvdp'.

See Also


Previous page  replace_block setActiveConfigSet Next page

© 1994-2005 The MathWorks, Inc.