www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@xregbdryroot/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. % % DATA = GETDATA(ROOT,'Response') % DATA = GETDATA(ROOT,'Local') % DATA = GETDATA(ROOT,'Global') % % The data will be in the form of a sweepset. % % See also XREGBDRYROOT, SWEEPSET. % Copyright 2000-2012 The MathWorks, Inc. and Ford Global Technologies, Inc. inputs.stage = 'response'; inputs.testId = []; for i=1:2:length(varargin) inputs.(varargin{i}) = varargin{i+1}; end switch lower( inputs.stage ), case 'response', data = root.BoundaryData.ResponseData; case 'local', if isempty(inputs.testId) warning(message('mbc:xrgbdryroot:NoTestID')) inputs.testId = 1; end data = root.BoundaryData.LocalData(inputs.testId); case 'global', data = root.BoundaryData.GlobalData; otherwise error(message('mbc:xrgbdryroot:InvalidArgument')); end