GETMODEL Return the model parameters CALL: model = getmodel(ef,id,treshLow,treshUp) model = character array of model parameters ind = indices to model parameters in id, i.e., model = id(ind,:); id = identification vector of main and interaction effects. ef = vector of average response, main effects and interaction effects. treshLow = lower treshhold (negative) treshUp = upper treshhold Example: y = [60 72 54 68 52 83 45 80]; % Responses to design D. [ef,id] = yates(y); nplot(ef,id) model = getmodel(ef,id,-1);
Display message and abort function. |
001 function [model, ind] = getmodel(ef,id,treshLow,treshUp) 002 %GETMODEL Return the model parameters 003 % 004 % CALL: model = getmodel(ef,id,treshLow,treshUp) 005 % 006 % model = character array of model parameters 007 % ind = indices to model parameters in id, i.e., model = id(ind,:); 008 % id = identification vector of main and interaction effects. 009 % ef = vector of average response, main effects and interaction effects. 010 % treshLow = lower treshhold (negative) 011 % treshUp = upper treshhold 012 % 013 % Example: 014 % y = [60 72 54 68 52 83 45 80]; % Responses to design D. 015 % [ef,id] = yates(y); 016 % nplot(ef,id) 017 % model = getmodel(ef,id,-1); 018 019 %History 020 % revised pab Dec2003 021 % removed some unused code 022 % by pab 200? 023 024 error(nargchk(3,4,nargin)) 025 026 if nargin<4|isempty(treshUp), treshUp = -treshLow; end 027 028 ind = find( ef(2:end)< treshLow | treshUp<ef(2:end)); 029 model = []; 030 if any(ind) 031 model = id(ind,:); 032 end 033 return 034
Comments or corrections to the WAFO group