pwSaveModelKeepingCustomStructure


 pwSaveModelKeepingCustomStructure(m, filename, dataID, classes, commentOut, append)

 Saves a model to harddisk by overwriting an existing model definition
 file without removing the custom structure, e.g. custom comments.

 

Arguments for pwSaveModelKeepingCustomStructure

 m           A model struct. If unspecified the highest selected model.
 filename    Filename of an existing model which should be updated.
 dataID      ID of a data set to store local parameters.
 classes     Cell array of classes or elements which will be updated
             in the given file corresponding to the values in m. If empty,
             all supported classes and elements will be updated:
             {'A','C','R','S','U','X','Y','Z','modelID','designerPropsM'}
 commentOut  Comments out objects which do not exist in model m.
             Default: false
 append      If true (=default), objects existing in the model struct which can
             not be located are appended.
             Set it to false if you work with IDs which are not literal
             strings like 'Erk1', but e.g. ['Erk', num2str(1)].
             These IDs can not be located automatically and the corresponding
             entry must be maintained manually.


 

Description

 Updates currently:

 pwAddA
 pwAddC
 pwAddR
 pwAddS
 pwAddU
 pwAddX
 pwAddY
 pwAddZ
 pwSetFittedK (not for simulated data starting with 'sim_')
 pwSetFittedX (not for simulated data starting with 'sim_')
 pwSetFittedS (not for simulated data starting with 'sim_')

 and the model ID and the visual designer properties of the model stored
 in the variable designerPropsM.

 Other classes are not yet supported, e.g.:

 pwAddConstraint
 pwAddE
 pwAddFunction
 pwAddODE
 pwAddP

 Please note that the complete line pwAdd... will be replaced.
 Therefore, custom comments within the same line will be lost.

 The old model file is backuped under:
 [filename, '--backup--', datestr(now, 30), '.tmp']

See also

pwSaveModel
pwSaveParametersIntoModelFile