MATLAB: Overloaded method defined in class definition, not working

classmethodoopoverloaded operator

Hi all,
I defined a method 'find' in a class definition('tree'). Upon doing 'help find' I can see it under the Overloaded Methods heading ('tree/find'). But when I try to use it MATLAB gives me error saying "Method 'find' is not defined for class 'tree' or is removed from MATLAB's search path." Would anyone have any idea what the problem might be? Thanks.

Best Answer

I made a classdef-file according to you description. It works as expected (R2013a).
>> t= cssm_tree
t =
cssm_tree with no properties.
>> t.find('abc')
cssm_tree/find
ans =
17
>> help find
....
Overloaded methods:
tree/find
mtree/find
cssm_tree/find
...
where
classdef cssm_tree < handle
methods
function ix = find( this, f )
% find is overloaded
disp( 'cssm_tree/find' )
ix = 17;
end
end
end