Documentation Center

  • Trial Software
  • Product Updates

ismethod

Determine if method of object

Syntax

tf = ismethod(h, 'methodName')

Description

tf = ismethod(h, 'methodName') returns logical 1 (true) if the specified methodName is a public method of object obj. Otherwise, returns logical 0 (false).

Examples

Determine if objects support equality testing:

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

See Also

| | |

Tutorials

Was this topic helpful?