MATLAB Object-Oriented Programming

(Joyce) #1

end
end
end


classdef Sub < Super
properties
Prop = 1
end
end


If you create an instance of the Sub class and use it to call the superclass method,
MATLAB accesses the private property of the superclass:


subObj = Sub


subObj =


Sub with properties:


Prop: 1


subObj.superMethod


ans =


2


See Also


More About



  • “Property Attributes” on page 8-9


See Also
Free download pdf