MATLAB Object-Oriented Programming

(Joyce) #1
ans =

Map with properties:

Count: 0
KeyType: char
ValueType: any

The loaded object has a different value assigned to the AveTemp property because the
saved value is now invalid. However, the load process suppresses the validation error.

To prevent loss of data when changing class definitions and reloading objects, implement
a loadobj method or class converter method that enables the saved values to satisfy the
current property validation.

For more information on saving and loading objects, see “Save and Load Process for
Objects” on page 13-2.

See Also


Related Examples



  • “Property Class and Size Validation” on page 8-31

  • “Property Validation Functions” on page 8-40


8 Properties — Storing Class Data

Free download pdf