www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@modeldev/StaticUpdate.m
function MD= StaticUpdate(MD,X,Y,KeepOutliers,UnChangedTests) %STATICUPDATE update model fit for new data % % OK= StaticUpdate(MD,X,Y,KeepOutliers,UnChangedTests) % Copyright 2007 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin==1 KeepOutliers=0; end if MD.BestModel==0 try if ~KeepOutliers MD.Outliers=[]; end Y(MD.Outliers)= NaN; % do a full refit on model m = reset(MD.Model); [m,MD.Status,MD.Statistics] = fitmodel(m,X,Y); MD.Model = cleanup(m); catch MD.Status = 0; end end