MATLAB Object-Oriented Programming
The meta.property object for property Foo has a value of true for its HasDefault property because Foo does have a default value: ...
dv = [] See Also Related Examples “Get Information About Properties” on page 16-14 16 Information from Class Metadata ...
Specialize Object Behavior “Methods That Modify Default Behavior” on page 17-2 “Number of Arguments for subsref and subsasgn” o ...
Methods That Modify Default Behavior In this section... “How to Customize Class Behavior” on page 17-2 “Which Methods Control Wh ...
Class Method to Implement Description disp display Called when you enter disp(obj) on the command line Called by statements that ...
Class Method to Implement Description size Determine the dimensions of an array See “Use of size and numel with Classes” on page ...
function. When you call plot with a timeseries object as an input argument, MATLAB calls the timeseries class method named plot. ...
Number of Arguments for subsref and subsasgn In this section... “How MATLAB Determines Number of Arguments” on page 17-6 “Syntax ...
This subscripted reference returns a comma-separated list of three elements. For this statement, the value of nargout in subsref ...
Syntax for subsref, and subsasgn Methods If a class overloads subsref to support either '{}', '.', or both types of indexing, an ...
Modify nargout and nargin for Indexing Methods In this section... “When to Modify Number of Arguments” on page 17-9 “How to Modi ...
function n = numArgumentsFromSubscript(obj,s,indexingContext) ... end Input Argument Description obj Object whose subsref or sub ...
Concatenation Methods In this section... “Default Concatenation” on page 17-11 “Methods to Overload” on page 17-11 Default Conca ...
Object Converters In this section... “Why Implement Converters” on page 17-12 “Converters for Package Classes” on page 17-12 “Co ...
classdef MyClass ... methods function objPkgClass = PkgName.PkgClass(objMyclass) ... end end end You cannot define a converter m ...
See Also Related Examples “Converter Methods” on page 10-21 “The Double Converter” on page 19-15 17 Specialize Object Behavior ...
Object Array Indexing In this section... “Default Indexed Reference and Assignment” on page 17-15 “What You Can Modify” on page ...
C = A(3,4); MATLAB calls the built-in subsref function to determine how to interpret the statement. Similarly, if you execute a ...
Once you add a subsref or subsasgn method to your class, then MATLAB calls only the class method, not the built-in function. The ...
For example, within a class method, this dot reference: obj.Prop calls the built-in subsref function. To call the class-defined ...
«
32
33
34
35
36
37
38
39
40
41
»
Free download pdf