How to implement binary tree in matlab

Can someone help me implement a binary tree in Matlab? Can we do this the same way we implement the same thing in C / C ++ using pointers? I happen to read a question related to the same, and the solution also uses "struct", but this code executes "n" the number of times, given that n is predefined. But I am dealing with a problem when a tree should be formed dynamically. i.e,

1.Take a node
    1.1 Do some processing 
    1.2 If the resulting two answers satisfy the condition, they are added as the left and     right children
    1.3 Continue the process till the condition is false.
 2.Trace back and move to the next node.

Thanks in advance.

+4
source share
1 answer

. C/++, - MATLAB. , .

, .

+2

Source: https://habr.com/ru/post/1526150/


All Articles