Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

Defining Classes — Syntax

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 classes 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 class definitions:

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS