matlab-tree
matlab-tree copied to clipboard
Unrecognized method, property, or field 'tostring' for class 'tree'.
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
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