function varargout = isoutlier(A,varargin)
%ISOUTLIER Find outliers in data
%   
%   TF = ISOUTLIER(A)
%   TF = ISOUTLIER(A, METHOD)
%   TF = ISOUTLIER(A, 'percentiles', [LP UP])
%   TF = ISOUTLIER(..., DIM)
%   TF = ISOUTLIER(..., 'ThresholdFactor', P)
%   TF = ISOUTLIER(..., 'MaxNumOutliers', MAXN)
%   [TF, LTHRESH, UTHRESH, CENTER] = ISOUTLIER(...)
%   
%   Limitations:
%   1. The following syntaxes are not supported:
%      B = ISOUTLIER(..., 'SamplePoints',X)
%      B = ISOUTLIER(..., 'DataVariables',DV)
%   2. The "movmedian" METHOD is not supported.
%   
%   See also: ISOUTLIER, GPUARRAY.
%   


%   Copyright 2019 The MathWorks, Inc.

varargout = cell(1,max(1,nargout));

% Only A is allowed to be remote.
if nargin>1
    [varargin{:}] = gather(varargin{:});
end
% If A is not remote, run on client.
if ~isa(A, 'gpuArray')
    [varargout{:}] = isoutlier(A, varargin{:});
    return
end

[varargout{:}] = parallel.internal.array.callToolboxFunction(...
    "matlab/datafun/isoutlier", A, varargin{:});