Documentation Center

  • Trial Software
  • Product Updates

Class Definition

classdef Syntax

Class definitions are blocks of code that are delineated by the classdef keyword at the beginning and the end keyword at the end. Files can contain only one class definition.

The following diagram shows the syntax of a classdef block. Only comments and blank lines can precede the classdef key word.

Examples of Class Definitions

See the following links for examples of classes defined for different purposes:

Was this topic helpful?