A MATLAB class definition is a template whose purpose is to provide a description of all the elements that are common to all instances of the class. Class members are the properties, methods, and events that define the class.
MATLAB classes are defined in code blocks, with sub-blocks delineating the definitions of various class members. See classdef Syntax for details on the classdef block.
Attributes modify the behavior of classes and the members defined in the class-definition block. For example, you can specify that methods are static or that properties are abstract, and so on. The following sections describe these attributes:
Class definitions can provide information, such as inheritance relationships or the names of class members without actually constructing the class. See Working with Meta-Classes.
[important]See Specifying Attributes for more on attribute syntax.[/important]
There are two kinds of MATLAB classes—handle and value classes.
See Comparing Handle and Value Classes for a more complete discussion.
For information on class constructors, see Class Constructor Methods
For information on creating arrays of objects, see Creating Object Arrays
For more information on how to define class hierarchies, see Building on Other Classes.