Main Content

Subclass Definition

Syntax and design of subclasses

Learn how to implement subclasses, call superclass methods from subclasses, and control what classes can derive from a superclass.

Tools

Class Diagram ViewerCreate diagrams to investigate class details and hierarchies (Since R2021a)

Functions

superclassesNames of superclasses

Classes

matlab.diagram.ClassViewerCreate class diagrams in Class Diagram Viewer app (Since R2021a)
matlab.mixin.HeterogeneousSuperclass for heterogeneous array formation

Topics

Class Hierarchies

Creating Subclasses

Handle Class Compatibility

Control Access to Class Members

  • Class Members Access
    Determine what level of access is allowed for properties, methods, and events.