MATLAB Object-Oriented Programming

(Joyce) #1

50 100 150 200 250


50


100


150


200


250


Because DocUint8 subclasses uint8, you can use any uint8 methods. For example,

size(img1)

ans =
280 272

returns the size of the image data.

Indexing Operations

Inherited methods perform indexing operations, but return objects of the same class as
the subclass.

Therefore, you can index into the image data and call a subclass method:

12 How to Build on Other Classes

Free download pdf