MATLAB Object-Oriented Programming
Automatic Updates for Modified Classes In this section... “When MATLAB Loads Class Definitions” on page 5-51 “Consequences of Au ...
NoteUsing an editor other than the MATLAB editor or using MATLAB Online™ can result in delays to automatic updating. Consequence ...
Enumeration block removed — Enumeration members are taken out of use. Superclass definition changed — Changes applied to all su ...
Some class updates cause situations in which MATLAB cannot update existing objects to conform to a modified class definition. Th ...
Change Effect Change ConstructOnLoad Loading classes obeys the current value of ConstructOnLoad. Change HandleCompatible Newly c ...
Change Effect Change property attribute value Applies changes to existing objects of the class. Some cases require transitional ...
Change Effect Change method attribute value Apply changes to existing objects of the class. Some cases require transitional step ...
Change Effect Change event attribute value Apply changes to existing objects of the class. Some cases require transitional steps ...
Compatibility with Previous Versions In this section... “New Class-Definition Syntax Introduced with MATLAB Software Version 7.6 ...
Changes to Class Constructors Class constructor methods have two major differences. Class constructors: Do not use the class fu ...
New Features Introduced with Version 7.6 Properties: “Ways to Use Properties” on page 8-2 Handle classes: “Comparison of Handle ...
Comparison of MATLAB and Other OO Languages In this section... “Some Differences from C++ and Java Code” on page 5-62 “Object Mo ...
Dispatching In MATLAB classes, method dispatching is not based on method signature, as it is in C++ and Java code. When the argu ...
Objects Passed to Functions MATLAB passes all variables by value. When you pass an object to a function, MATLAB copies the value ...
function y = g(x) x.Color = 'blue'; y = x; end y = g(obj); The function g modifies its copy of the input object and returns that ...
function obj = SimpleHandleClass(c) if nargin > 0 obj.Color = c; end end end end Create an instance of SimpleHandleClass, ass ...
MATLAB Passes Handles by Value A handle variable is a reference to an object. MATLAB passes this reference by value. Handles do ...
A.B = C Introduce a new variable, A, that is a struct containing a field B whose value is C. If A.B = C could refer to a static ...
Technique How to Use in MATLAB Named constants See “Define Class Properties with Constant Values” on page 15-2 and “Named Values ...
...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf