function varargout = max(varargin)
%MAX Largest component of codistributed array
%   M = MAX(X)
%   C = MAX(X,Y)
%   [M,I] = MAX(X)
%   [M,I] = MAX(X,[],DIM)
%   [M,I] = MAX(X,[],...,'linear')
%   MAX(...,'omitnan')
%   MAX(...,'includenan')
%   MAX(...,'ComparisonMethod',METHOD)
%   
%   Limitations:
%   Index output is not supported for codistributed tabular inputs.
%   
%   Example:
%   spmd
%       N = 1000;
%       D = codistributed(magic(N))
%       m = max(D)
%       m1 = max(D,[],1)
%       m2 = max(D,[],2,'omitnan')
%   end
%   
%   m and m1 are both codistributed row vectors, m2 is a codistributed column 
%   vector.
%   
%   See also MAX, CODISTRIBUTED, MAGIC.
%   


%   Copyright 2006-2023 The MathWorks, Inc.

[varargout{1:nargout}] = minmaxOp(@max,varargin{:});
