www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgoptimnode/getConnections.m

    function [pNode,pData,pDep] = getConnections(N)
%GETCONNECTIONS Get connections for optim node
%
%  [pNode,pData,pDep] = GETCONNECTIONS(N)

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


[pNode,pData,pDep] = getConnections(N.cgcontainer);

if numChildren(N)>0
    % Need to return the table filling pointers from here at some point
    [pOutputNode,pOutputData,pOutputDep]= children(N,@getConnections);
    % pOutputNode,pOutputData are treated as Internal Pointers to the OptimNode
    % pOutputDep is a cell array of cells
    pOutputDep = [pOutputDep{:}];
    % concatenate cgoptim dependents
    pDep{1} = [pDep{1} unique([pOutputDep{:}])];
end