www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgnode/recursivesearch.m
function p=recursivesearch(nd,data) %RECURSIVESEARCH Search tree for nodes related to data % % p=RECURSIVESEARCH(ND, DATA) searches down the tree from ND % and returns a list of node pointers that are related to DATA. % % Copyright 2000-2014 The MathWorks, Inc. and Ford Global Technologies, Inc. % Default for nodes is not to recognise the data, but to recurse nd=address(nd); ch=nd.children; p=[]; for n=1:length(ch) p=[p ch(n).recursivesearch(data)]; end