Main Content

Class File Organization

Class syntax, attributes, and organization in files and folders

Specify class attributes in the class definition block and organize class files and folders using packages. Learn how MATLAB® evaluates expressions used in class definitions. Create aliases to rename classes while maintaining backward compatibility.


classClass of object
classdefClass definition keywords
isobjectDetermine if input is MATLAB object
importAdd package, class, or functions to current import list


matlab.alias.AliasFileManagerCreate and manage class alias definitions


Defining Classes

  • User-Defined Classes
    MATLAB enables you to define classes to implement object-oriented designs.
  • Class Attributes
    Class attributes enable you to modify the behavior of classes that you define.

Class and Package Folders

Expressions in Classes

Class Aliasing