saveobj
Customize save process for objects
Syntax
Description
Note
The matlab.mixin.CustomElementSerialization
class is recommended over
loadobj
and saveobj
because the mixin
provides greater control over how objects are serialized and deserialized, including the
ability to add, delete, and rename properties. (since R2024b)
is
called by the b
= saveobj(a
)save
function if the class of
a
defines a saveobj
method.
save
writes the returned value, b
, to a MAT
file.
Examples
Input Arguments
Output Arguments
Tips
Implement your
saveobj
method to work with scalar objects or structures. When you save an object array,save
callssaveobj
on each element of the array.
Version History
Introduced before R2006a