This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Determine if method of object


tf = ismethod(obj,methodName)


tf = ismethod(obj,methodName) returns logical 1 (true) if the specified methodName is a nonhidden, public method of object obj. Otherwise, returns logical 0 (false). The methodName argument is a character vector or a string scalar.


Determine if objects support equality testing:

if ismethod(obj1,'eq') && ismethod(obj2,'eq')
   tf = obj1 == obj2;

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced before R2006a