www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@des_linearmod/min_points.m
function n=min_points(des) %MIN_POINTS Return the minimum number of points for a design % % N=MIN_POINTS(DES) returns the minimum number of points necessary % to allow a design to pass the rankcheck test. % % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. % Created 24/3/2000 % start at number of terms in model, then try increasing/decreasing np= numParams(model(des)); n=np; % des=reinit(des,np); % % if npoints(des) % % try taking a point off % rc=rankcheck(des); % while rc % des=delete(des,'random',1); % rc=rankcheck(des); % end % n=npoints(des)+1; % else % n=1; % while ~npoints(des) & n<=3*np % des=reinit(des,np+n); % n=n+1; % end % if npoints(des) % n = npoints(des); % else % % minimum not found % n = []; % end % end