Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecognized method, property, or field 'tostring' for class 'tree'. #9

Open
asma1994-bejaia opened this issue Feb 19, 2022 · 1 comment

Comments

@asma1994-bejaia
Copy link

t = tree('root');
[ t node1 ] = t.addnode(1, 'Node 1'); %% attach to root
% node1 now contains the index of the first node.
[ t node2 ] = t.addnode(1, 'Node 2'); %% attach to root
[ t node11 ] = t.addnode(node1, 'Child of node 1'); %% attach to first node
disp(t.tostring)

hi !
I get this message "Unrecognized method, property, or field 'tostring' for class 'tree'." when caling the tostring method and many authers methods like "graft", even if I added the location of the file that contains the tree class and the assosiated methods to the path of th system.
I would be very gratiful if somone can help me

@tinevez
Copy link
Owner

tinevez commented Feb 19, 2022

Hello.

It looks like you did not set the path correctly. You must add the folder in which the @tree folder is, but not the content of the folder iteself.

Check this:
https://se.mathworks.com/help/matlab/matlab_oop/organizing-classes-in-folders.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants