function varargout = sub2ind(varargin)
%SUB2IND overloaded for distributed arrays
%   SUB2IND is used to determine the equivalent single index corresponding
%   to a given set of subscript values.
%   
%   Example:
%       rows = distributed.colon(1,2,10);
%       cols = distributed.colon(2,2,10);
%       sz = [20 20];
%       ind = sub2ind(sz,rows,cols)
%   
%   See also SUB2IND, DISTRIBUTED.IND2SUB, DISTRIBUTED.


%   Copyright 2011-2019 The MathWorks, Inc.

[varargout{1:max(nargout, 1)}] = distributedutil.distributedSpmdWrapper( @sub2ind, varargin{:} );
