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

    function L = RemoveOutliers(L,varargin)
%REMOVEOUTLIERS Refit models after removing outliers.
%
%   REMOVEOUTLIERS( LOCALRESPONSE, LOCALSELECTION )
%   REMOVEOUTLIERS( LOCALRESPONSE, LOCALSELECTION, GLOBALSELECTION )
%
%   LOCALSELECTION and GLOBALSELECTION can either be sets 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
%
%   See also mbcmodel.localresponse.OutlierIndices,
%   mbcmodel.localresponse.RestoreData

%   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

try
    RemoveOutliers(L.Object, varargin{:});
catch
    error(message('mbc:mbcmodel:localresponse:UnknownError'));
end