(→Table of Class Method Attributes<ref>Method Attributes</ref>)
m (1 revision)
Latest revision as of 12:12, 18 April 2013
1 Introduction to MATLAB 2009a Class Method Attributes
Classes in MATLAB 2009a can have several methods. After the classdef command line you must define your class properties. Once your properties are defined you define your methods. All available attributes are listed in the methods table.
Note that the first method you define should be the instantiation method (has the same name as the class).
1.1 Example Method Definitions
Most methods will be declared simply like this:
classdef ... % Public properties ... end ... methods ... end
All method types are detailed in the next section.
See the psdData Class Example for more information.
2 Table of Class Method Attributes
If true, the method has no implementation.
The method has a syntax line that can include arguments, which subclassesuse when implementing the method:
Default = public
Determines what code can call this method:
|When false, the method name shows in the
list of methods displayed using the methods or methodsview commands. If set to true, the method name is not includedin these listings.
|If true, the method cannot be redefined
in a subclass. Attempting to define a method with the same name ina subclass causes an error.
Set to true to define a method that
is not depend on an object of the class and does not require an objectargument. You must use the class name to call the method: classname.methodname
MATLAB 2009a Help
- Method Attributes
4 MATLAB Related Books