MATLAB Object-Oriented Programming

(Joyce) #1

New Features Introduced with Version 7.6



  • Properties: “Ways to Use Properties” on page 8-2

  • Handle classes: “Comparison of Handle and Value Classes” on page 7-2

  • Events and listeners: “Event and Listener Concepts” on page 11-14

  • Class member attributes: “Attribute Specification” on page 5-22

  • Abstract classes: “Abstract Classes” on page 12-91

  • Dynamic properties: “Dynamic Properties — Adding Properties to an Instance” on
    page 8-69

  • Ability to subclass MATLAB built-in classes: “Design Subclass Constructors” on page
    12-9

  • Packages for scoping functions and classes: “Packages Create Namespaces” on page
    6-25. MATLAB does not support packages for classes created before MATLAB Version
    7.6 (that is, classes that do not use classdef).

  • The JIT/Accelerator supports objects defined only by classes using classdef.


Examples of Old and New


The MATLAB Version 7.6 implementation of classes uses different syntax from previous
releases. However, classes written in previous versions continue to work. Most of the
code you use to implement the methods is likely to remain the same, except where you
take advantage of new features.


The following sections reimplement examples using the latest syntax. The original
MATLAB Classes and Objects documentation implemented these same examples and
provide a comparison of old and new syntax.


“Representing Polynomials with Classes” on page 19-2


“A Class Hierarchy for Heterogeneous Arrays” on page 20-2


Compatibility with Previous Versions
Free download pdf