www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mctree/findptr.m

    function pNode = findptr(nd, ptrs)
%FINDPTR Look for pointers inthis node
%
%  PNODE = FINDPTR(ND, PTRS) checks for instances of any of the pointers in
%  PTRS within the node ND.  If any exist, the node pointer is returned,
%  otherwise an empty pointer array is returned.

%  Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc.


allptrs = getptrs(nd);
if anymember(ptrs, allptrs)
    pNode = address(nd);
else
    pNode = assign(xregpointer, []);
end