pwSaveModel


 [filename, backupFile] = pwSaveModel(model, filename, proposedFilename, openInEditor,
                        saveExpandedVersion, includeComments)

 Saves a model as a valid PottersWheel model definition file.

 

Arguments for pwSaveModel

 model           If empty ([]), the currently selected model is saved.
                 If a number, the corresponding model in the repository
                 list is saved.
                 Else, a model struct is expected.

 filename        If filename is not given, a file saving dialog opens.
                 If the file already exists, PW tries to create a backup file
                 if config.general.doBackup == true.
                 The filename without path and extension will be used as the new model ID.
                 The complete filename will be returned.

 backupFile      Name of the backupped old model file (if any).

 includeComments Help comments can be included into the model comprising a short
                 description and examples for all essential model sections.

 openInEditor    true by default

 

Description

 The model will be saved ignoring any custom comments or commands in the
 target file. Otherwise please use pwSaveModelKeepingCustomStructure.

 

Example

 pwSaveModel(3, 'JakStat.m'); % to save the third model

See also

pwAddModel
pwConfiguration
pwSaveModelKeepingCustomStructure