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

    function nd=addtoproject(nd,data,n_sub)
%ADDTOPROJECT  add data to the project
%
% ADDTOPROJECT(ND,DATA,NSUB)
%
%  If NSUB (a cgnode) is specified then DATA is ignored, otherwise
%  a cgnode is constructed for DATA.
%

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



if nargin<3
   n_sub=cgnode(data.info,[],data,1);
end

% pass call to new interface
nd=addnodestoproject(nd,n_sub);