www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcmodel/@localresponse/RemoveOutliersForTest.m

    function L = RemoveOutliersForTest(L,varargin)
%REMOVEOUTLIERSFORTEST Removing outliers and refit response.
%
%   REMOVEOUTLIERSFORTEST( LOCALRESPONSE, TESTNUMBER, LOCALSELECTION )
%   REMOVEOUTLIERSFORTEST( LOCALRESPONSE, TESTNUMBER, LOCALSELECTION, DOUPDATE )
%
%   LOCALSELECTION can either be a set of indices, or a function name.  
%   A outlier selection function must  take the following   form:
%     INDICES = MYMATLABFILE(MODEL, DATA, FACTORNAME); 
%   The factors are the same as defined in DiagnosticStatistics. DATA
%   contains the factors as columns of a matrix FACTORNAME is a cell
%   array of the names for each factor.
%   If DOUPDATE is true then all response features are updated
%
%  Example. For a local response LOCALRESPONSE
%     % remove first two data points and do not update response features
%     RemoveOutliersForTest(LOCALRESPONSE,1,1:2,false); 
%     % find list of indices of removed data points 
%     indices = OutliersForTest(LOCALRESPONSE,1);
%     % restore first data point
%     RestoreDataForTest(LOCALRESPONSE,1,1,false); 
%     % restore all data
%     RestoreDataForTest(LOCALRESPONSE,1,':',false); 
%     % update response features
%     UpdateResponseFeatures(LOCALRESPONSE);
%
%   See also mbcmodel.localresponse.UpdateResponseFeatures,
%   mbcmodel.localresponse.RestoreDataForTest,
%   mbcmodel.localresponse.OutlierIndicesForTest

%   Copyright 2004-2010 The MathWorks, Inc.

% Note it is also possible to use a special array to do standard types of
% outlier removal (available from popmenus in model browser dialog). This
% option is not documented because of its complexity

RemoveOutliersForTest(L.Object, varargin{:});