function b = renamecats(a, varargin)
%RENAMECATS Rename categories in a categorical array.
%   
%   B = RENAMECATS(A,NAMES)
%   B = RENAMECATS(A,OLDNAMES,NEWNAMES)
%    
%   See also CATEGORICAL/RENAMECATS, distributed.
%   


%   Copyright 2016-2019 The MathWorks, Inc.

narginchk(2,3); % renamecats(A,OLDNAMES,NEWNAMES)
if nargout == 0
    if nargin < 3
        error(message('MATLAB:categorical:NoLHS',upper(mfilename),',NEWNAMES'));
    else
        error(message('MATLAB:categorical:NoLHS',upper(mfilename),',OLDNAMES,NEWNAMES'));
    end
end

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