www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@xregbdrybranch/getdata.m
function data = getdata( root, varargin ) %GETDATA Get the modeling data from boundary constraint root node. % % DATA = GETDATA(ROOT) is the data that is valid for the boundary modeling % at the given root node. % % The data returned is dependent on the Stages field of ROOT: % Stages = 0 (Response) double array of all data points % Stages = 1 (Local) sweepset of local and global data % Stages = 2 (Global) double array of global data points % % See Also XREGBDRYBRANCH. % Copyright 2000-2012 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~(mod(length(varargin), 2) == 0) warning('odd number of inputs') end switch root.Stages case 0 stage = 'response'; case 1 stage = 'local'; case 2 stage = 'global'; end for i=length(varargin):-2:1 if strcmp(varargin{i-1}, 'stage') stage = varargin{i}; varargin([i-1,i]) = []; end end p = Parent( root ); % xregbdryroot data = getdata(p.info, 'stage', stage, varargin{:});