www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffnode/recursivesearch.m
function p=recursivesearch(obj,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. p = null(xregpointer, 0); if isa(data, 'xregpointer') if any(data==obj.Tables) ... || any(data==obj.FillExpressions) ... || any(data==obj.FillMaskExpressions) ... || any(data==obj.GraphExpressions) p = address(obj); end end % Only search sub-nodes that are rables ch = getTableNodes(obj); for n = 1:length(ch) p = [p ch(n).recursivesearch(data)]; end