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

    function R = RemoveOutliers(R, varargin)
%REMOVEOUTLIERS Refit models after removing outliers.
%
% REMOVEOUTLIERS(RESPONSE,SELECTIONCRITERIA)
%
%   SELECTIONCRITERIA can either be sets of indices, or a function name. An
%   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.abstractresponse.OutlierIndices,
%   mbcmodel.response.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(R.Object, varargin{:});
catch
    error(message('mbc:mbcmodel:response:UnknownError'));
end