www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgprojconnections/getSource.m

    function C= getSource(A,items,C)
%GETSOURCE get source dependencies
% 
%C= getSource(A,items)

%  Copyright 2000-2008 The MathWorks, Inc.

if nargin<3
    C= false(size(A.Names));
end
C= iSrc(A.Connections,C,items);
C(items)= false;
C = find(C & A.IsMajorItem);

function C= iSrc(M,C,items)

f= M(items,:);
if any(f)
    for i= find(f)
        C= iSrc(M,C,i);
    end
else
    C(items)= true;
end