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

    function ind = childindex(T)
%CHILDINDEX Index from parent's child list
%
%   INDEX = CHILDINDEX(T) returns the index of T in the parent's list of
%   children.

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


if ~isnull(T.Parent)
    ch = T.Parent.children;
    ind = find(address(T)==ch);
else
    ind = 0;
end