All classes support the attributes listed in the following table.
Attributes enable you to modify the behavior of class. Attribute values
apply to the class defined within the classdef
block.
classdef (Attribute1 = value1, Attribute2 = value2,...) ClassName ... end
Class Attributes
Attribute Name | Class | Description |
---|---|---|
|
(default = | If specified as See Abstract Classes for more information. |
|
| List classes that can subclass this class. Specify subclasses
as
Specify See Specify Allowed Subclasses for more information. |
|
(default = | If See Initialize Objects When Loading for more information. |
|
(default = | If specified as |
|
(default = | If true , this class does not appear in the
output of the superclasses or help functions. |
|
| Use this attribute to establish a precedence relationship
among classes. Specify a cell array of The fundamental classes are always inferior to user-defined classes and do not show up in this list. See Class Precedence and Dominant Argument in Overloaded Graphics Functions. |
|
(default = | If |
Attributes are specified for class members in the classdef
, properties
, methods
,
and events
definition blocks. The particular attribute
setting applies to all members defined within that particular block.
You can use multiple properties
definition blocks
to apply different attribute setting to different properties.
Class attributes are not inherited, so superclass attributes do not affect subclasses.
Specify class attribute values in parentheses, separating each
attribute name/attribute value pair with a comma. The attribute list
always follows the classdef
or class member keyword,
as shown:
classdef (attribute-name = expression, ...) ClassName properties (attribute-name = expression, ...) ... end methods (attribute-name = expression, ...) ... end events (attribute-name = expression, ...) ... end end