Symbol
Role
More Information
||
Find logical OR (with shortcircuiting)
~
Find logical NOT
not
Special Characters
@
Name: At symbol
Uses:
• Function handle construction and reference
• Calling superclass methods
Description: The @ symbol forms a handle to either the named function that follows the @
sign, or to the anonymous function that follows the @ sign. You can also use @ to call
superclass methods from subclasses.
Examples
Create a function handle to a named function:
fhandle = @myfun
Create a function handle to an anonymous function:
fhandle = @(x,y) x.^2 + y.^2;
Call the disp method of MySuper from a subclass:
disp@MySuper(obj)
Call the superclass constructor from a subclass using the object being constructed:
obj = obj@MySuper(arg1,arg2,...)
More Information:
• “Create Function Handle” on page 13-2
• “Call Superclass Methods on Subclass Objects”
MATLAB Operators and Special Characters
2-3
Précédent

- 53/1450

Suivant