function varargout = trace(varargin)
%TRACE Sum of diagonal elements.
%   TRACE(A)
%   
%   Example:
%       A = distributed.rand(1e2);
%       traceA = trace(A);
%   
%   See also TRACE, DISTRIBUTED, DISTRIBUTED/RAND.


%   Copyright 2019 The MathWorks, Inc.

% Flow through the standard MATLAB version on the codistributed array
varargout = cell(1,max(1,nargout));
[varargout{:}] = distributedutil.distributedSpmdWrapper( @trace, varargin{:} );
