MATLAB Object-Oriented Programming

(Joyce) #1

Methods for Indexing


To support indexing operations, the subclass must implement these methods:



  • subsasgn — Implement dot notation and indexed assignments

  • subsref — Implement dot notation and indexed references

  • subsindex — Implement object as index value


Methods for Concatenation


To support concatenation, the subclass must implement the following methods:



  • horzcat — Implement horizontal concatenation of objects

  • vertcat — Implement vertical concatenation of objects

  • cat — Implement concatenation of object arrays along specified dimension


See Also


Related Examples



  • “Representing Hardware with Classes” on page 12-83

  • “Subclasses of Built-In Types with Properties” on page 12-68

  • “Subclasses of Built-In Types Without Properties” on page 12-60


See Also
Free download pdf