[MATLAB logo] Exploiting MATLAB's Data Structures

Object-oriented Programming

Usage: Use objects to encapsulate information and supply natural methods.

Example:

sym, in the Symbolic Math Toolbox
inline, for creating in-line functions rather than needing to create separate simple 1-line M-files

Problem #8 - Roman calculator

More info ...

Specialized object functions

class Create object or return object class
struct Convert object to structure array
methods Display class method names
isa True if object is a given class
inferiorto Inferior class relationship
superiorto Superior class relationship

Some overloaded functions

plus Overloadable method for a+b
mtimes Overloadable method for a*b
subsref Overloadable method for a(i),a{i},a.name
eq Overloadable method for a==b
transpose Overloadable method for a'
horzcat Overloadable method for [a b]

see also the datatypes directory or Chapter 14 of Using MATLAB.

Copyright © 1997 The MathWorks, Inc.
clay@mathworks.com
$Revision$ $Date$