MATLAB Object-Oriented Programming
pd pd = PropertyDefaults with properties: p1: ' 4:45 PM' p2: 'green' p3: 0.7854 Call the resetDefaults method, whi ...
It is a handle class (it derives from handle). All its superclasses are handle compatible (handle classes are handle compatible ...
ans = 0 See Also Related Examples “Methods for Handle Compatible Classes” on page 12-46 See Also ...
Methods for Handle Compatible Classes In this section... “Methods for Handle and Value Objects” on page 12-46 “Modify Value Obje ...
See Also Related Examples “Handle-Compatible Classes and Heterogeneous Arrays” on page 12-48 See Also ...
Handle-Compatible Classes and Heterogeneous Arrays In this section... “Heterogeneous Arrays” on page 12-48 “Methods Must Be Seal ...
Each subclass in the heterogeneous hierarchy implements a concrete version of the abstract method. The concrete method provides ...
Subclasses of MATLAB Built-In Types In this section... “MATLAB Built-In Types” on page 12-50 “Built-In Types You Can Subclass” o ...
Why Subclass Built-In Types Subclass a built-in class to extend the operations that you can perform on a particular class of dat ...
Behavior Categories When you call an inherited method on a subclass of a built-in class, the result depends on the nature of the ...
Methods for Indexing To support indexing operations, the subclass must implement these methods: subsasgn — Implement dot notati ...
Behavior of Inherited Built-In Methods In this section... “Subclass double” on page 12-54 “Built-In Data Value Methods” on page ...
Call a method inherited from class double that operates on the data, such as sum. sum returns a double and, therefore, uses the ...
sc = DocSimpleDouble(1:10); a = sin(sc); class(a) ans = double Built-In Data Organization Methods This group of built-in methods ...
Built-In Indexing Methods Built-in classes use specially implemented versions of the subsref, subsasgn, and subsindex methods to ...
ans = 1x20 DocSimpleDouble: double data: Columns 1 through 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Columns 14 through 20 14 15 16 17 18 ...
“Subclasses of Built-In Types with Properties” on page 12-68 See Also ...
Subclasses of Built-In Types Without Properties In this section... “Specialized Numeric Types” on page 12-60 “A Class to Manage ...
if nargin == 0 data = uint8(0); end obj = obj@uint8(data); % Store data on superclass end function h = showImage(obj) data = uin ...
50 100 150 200 250 50 100 150 200 250 Because DocUint8 subclasses uint8, you can use any uint8 methods. For example, size(img1) ...
«
23
24
25
26
27
28
29
30
31
32
»
Free download pdf