function a = addcats(a, varargin)
%ADDCATS Add categories to a distributed categorical array.
%   
%   B = ADDCATS(A,NEWCATEGORIES)
%   B = ADDCATS(A,NEWCATEGORIES,'After',WHERE)
%   B = ADDCATS(A,NEWCATEGORIES,'Before',WHERE)
%    
%   See also CATEGORICAL/ADDCATS, distributed.
%   


%   Copyright 2016-2019 The MathWorks, Inc.

narginchk(2,4); % addcats(A,NEWCATEGORIES,'After',WHERE)

% If the user forgets to capture the modified output, error
if nargout == 0
    error(message('MATLAB:categorical:NoLHS',upper(mfilename),',NEW,...'));
end

a = distributedutil.distributedSpmdWrapper( @addcats, a, varargin{:} );
