MATLAB Object-Oriented Programming

(Joyce) #1

showImage(img1(100:200,1:160));


Subscripted reference operations (controlled by the inherited subsref method) return a
DocUint8 object.


20 40 60 80 100 120 140 160


10


20


30


40


50


60


70


80


90


100


You can assign values to indexed elements:


img1(100:120,140:160) = 255;
img1.showImage;


Subscripted assignment operations (controlled by the inherited subsasgn method) return
a DocUint8 object.


Subclasses of Built-In Types Without Properties
Free download pdf