search in data structure type
Show older comments
Hi, I have a struct type array:
subtree(1).Parent= [2 2 2]
subtree(1).Children= [1 2 3; 3 2 4]
subtree(2).Parent= [1 2 2]
subtree(2).Children= [1 2 3; 5 5 5]
My question is, if I know the Parent value=[2 2 2] and I don't know the subtree index, how can I find/search its children=[1 2 3; 3 2 4]? In another words how I can get the index of the subtree that contain Parent= [2 2 2]
Accepted Answer
More Answers (1)
Chandrasekhar
on 4 Apr 2014
1 vote
Struct Find I hope this will help you.
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!