Main Content

Object Save and Load

Customize the object save and load process

MATLAB® provides default behavior for load and save with objects, but you can customize the process of serializing (saving) and deserializing (loading) objects using one of two approaches:

See When to Customize the Serialization Process for more information.

Classes

matlab.mixin.CustomElementSerializationCustomize how objects are serialized and deserialized (Since R2024b)
matlab.serialization.ElementSerializationContentRepresentation of serialized object (Since R2024b)
matlab.serialization.SerializationContextContext in which objects are serialized (Since R2024b)

Functions

saveobjCustomize save process for objects
loadobjCustomize load process for objects

Topics

Default Behavior for save and load with Objects

Customize Object Serialization