MATLAB Object-Oriented Programming

(Joyce) #1
b = ClassExp;
b.ObjProp.TimeProp

ans =

08-Oct-2003 17:46:01

Reassign the value of the contained object TimeProp property:

b.ObjProp.TimeProp = datestr(now);
b.ObjProp.TimeProp

ans =

08-Oct-2003 17:47:34

The ObjProp property of object b contains a handle to the same object as the ObjProp
property of object a. The value of the TimeProp property has changed on this object as
well:

a.ObjProp.TimeProp

ans =

08-Oct-2003 17:47:34

See Also


More About



  • “Comparison of Handle and Value Classes” on page 7-2


6 Defining and Organizing Classes

Free download pdf