MATLAB Object-Oriented Programming

(Joyce) #1

end
end


The character array, 'USA', is a good default value because:



  • MATLAB assigns an empty double [] to properties that do not have default values
    defined by the class. Empty double is not a valid value for the Country property.

  • In version 1, all employees were in the USA. Therefore, any version 1 object loaded
    into version 2 receives a valid value for the Country property.


See Also


Related Examples



  • “Modify the Save and Load Process” on page 13-16

  • “Object Save and Load”


See Also
Free download pdf