copy the data stored in the object properties. The copy refers to the same object as the
original handle. If you change a property value on the original object, the copied handle
references the same change.Handle Object BehaviorHere is a handle class that stores a value in its Number property. The default property
value is the number 1.classdef NumHandle < handle
properties
Number = 1
end
endCreate a NumHandle objects assigned to the variable a.a = NumHandlea =NumHandle with properties:Number: 1Assign the value of a to another variable, b.b = ab =NumHandle with properties:Number: 1The variables a and b refer to the same underlying object. Changing the value of the
Number property of a also changes the Number property of b. That is, a and b refer to the
same object.a.Number = 7a =NumHandle with properties:7 Value or Handle Class — Which to Use