Programming Previous page   Next Page

Identifying Objects Outside the Class Directory

The class and isa functions used in constructor methods can also be used outside of the class directory. The expression

checks whether a is an object of the specified class. For example, if p is a polynom object, each of the following expressions is true.

Outside of the class directory, the class function takes only one argument (it is only within the constructor that class can have more than one argument).

The expression

returns a string containing the class name of a. For example,

return

Use the whos function to see what objects are in the MATLAB workspace.


Previous page  The Class Constructor Method The display Method Next page

© 1994-2005 The MathWorks, Inc.