end
endCreate an object of this class:hobj1 = HdClass(8)Because this statement is not terminated with a semicolon, MATLAB displays information
about the object:hobj1 =HdClass with properties:Data: 8The variable hobj1 is a handle that references the object created. Copying hobj1 to
hobj2 results in another handle referring to the same object:hobj2 = hobj1hobj2 =HdClass with properties:Data: 8Because handles reference the object, copying a handle copies the handle to a new
variable name, but the handle still refers to the same object. For example, given that
hobj1 is a handle object with property Data:hobj1.Dataans =8Change the value of hobj1's Data property and the value of the copied object's Data
property also changes:hobj1.Data = 5;
hobj2.Dataans =516 Using Objects