saveObjectImpl
Class: matlab.System
Save System object in MAT file
Syntax
s = saveObjectImpl(obj)
Description
specifies the System object™ properties and state values to be saved in a structure or MAT file. s
= saveObjectImpl(obj
)
If you do not define a saveObjectImpl
method for your
System object class, only public properties and properties with the DiscreteState
attribute are saved. To save any private or protected properties or
state information, you must define a saveObjectImpl
in your
class definition file.
Your loadObjectImpl
method should correspond to your
saveObjectImpl
method to ensure that all saved properties and data are
loaded.
Run-Time Details
save
calls saveObject
, which
then calls saveObjectImpl
. To save a System object in generated code, the object must be unlocked and it cannot contain or be a
child object.
End users can use load
, which calls loadObjectImpl
to load a saved System object into their workspace.
Method Authoring Tips
You must set
Access = protected
for this method.Save the state of an object only if the object is in use. When the user loads that saved object, it loads in that usage state.
To save child object information, use the associated
saveObject
method within thesaveObjectImpl
method.
Input Arguments
Output Arguments
Examples
Version History
Introduced in R2012b