www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@mdevtestplan/BoundaryModel.m
function [c] = BoundaryModel( T, m, varargin ) %BOUNDARYMODEL The boundary constraint associated with a test plan % % C = BOUNDARYMODEL(T,M) is the boundary constraint that is associated % with the test plan T that is appropriate for the model M. % % C = BOUNDARYMODEL(T,LocalModel,TestNo); % get local boundary model for test % % See also XREGBDRYROOT/GETCONSTRAINT. % Copyright 2000-2008 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin<2 m = 0; end if isempty(T.ConstraintData) || T.ConstraintData==0 c=[]; else if isnumeric(m) Type = m; Inps = getInputs(T); switch Type case 0 nf = sum( cellfun(@length, Inps) ); case 1 nf = length(Inps{1}); case 2 nf = length(Inps{2}); end else if isa(m,'localmod') % || isa(m,'xregtwostage') Type= 1; % local model elseif numstages(T)>1 && nfactors(m)<nfactors(HSModel(T.DesignDev)) Type= 2; % global model else Type= 0; % response model end nf = nfactors(m); end c= T.ConstraintData.getconstraint(nf , Type,varargin{:} ); end