
%DISTRIBUTED Distributed array data type
%
%   A distributed array uses the combined memory of multiple workers in a
%   parallel pool to store the elements of an array. This allows a parallel
%   pool to accommodate an array that might be too large to fit into the
%   memory of a single machine.
%
%   Distributed arrays can be constructed directly either using the
%   constructor DISTRIBUTED, or by using one of the static constructor
%   methods such as DISTRIBUTED.ONES. Distributed arrays are also created
%   automatically when CODISTRIBUTED arrays return from the body of an SPMD
%   block.
%
%   Example: various means of constructing distributed arrays
%   Nsmall = 50;
%   Nlarge = 1000;
%   % method 1: use the constructor directly with local data
%   D1 = distributed( magic( Nsmall ));
%   % method 2: use a static method
%   D2 = distributed.ones( Nlarge );
%   % method 3: D3 is returned as a distributed array from the SPMD block
%   spmd
%     D3 = codistributed.ones( Nlarge );
%   end
%   class( D3 )       % returns 'distributed'
%   isequal( D2, D3 ) % returns true
%
%   Many mathematical and plotting methods are defined for distributed
%   arrays. Call METHODS( 'DISTRIBUTED' ) to see a full listing. The following
%   lists contain only the intrinsic methods of distributed arrays.
%
%   distributed methods:
%   DISTRIBUTED      - construct from local data or datastore
%   ISDISTRIBUTED    - return true for distributed arrays
%   GATHER           - retrieve data from the workers to the client
%   underlyingType   - return the class of the elements
%   isUnderlyingType - return true if elements are of a given class
%
%   distributed static methods:
%   CELL      - build distributed cell array
%   COLON     - build distributed vector of form a:[d:]b
%   EYE       - build distributed identity matrix
%   FALSE     - build distributed array containing 'false'
%   INF       - build distributed array containing 'Inf'
%   LINSPACE  - build distributed vector of linearly equally spaced values
%   LOGSPACE  - build distributed vector of logarithmically equally spaced values
%   NAN       - build distributed array containing 'NaN'
%   ONES      - build distributed array containing ones
%   RAND      - build distributed array containing rand
%   RANDI     - build distributed array containing randi
%   RANDN     - build distributed array containing randn
%   SPALLOC   - build empty sparse distributed array
%   SPEYE     - build sparse distributed identity matrix
%   SPRAND    - build sparse distributed array containing rand
%   SPRANDN   - build sparse distributed array containing randn
%   SPRANDSYM - build sparse symmetric distributed array containing rand
%   TRUE      - build distributed array containing 'true'
%   ZEROS     - build distributed array containing zeros
%
%   See also DISTRIBUTED.DISTRIBUTED, SPMD, PARPOOL, CODISTRIBUTED

% Copyright 1984-2023 The MathWorks, Inc.
classdef (SupportExtensionMethods = true, ...
          InferiorClasses = {?matlab.graphics.axis.Axes, ?matlab.ui.control.UIAxes, ?matlab.graphics.animation.AnimatedLine, ...
                        ?calendarDuration, ?categorical, ?datetime, ?duration, ...
                        ?table, ?timetable, ?string, ?missing}) ...
        distributed ...
        < spmdlang.AbstractRemote ...
        & matlab.mixin.internal.indexing.LazyColon ...
        & matlab.mixin.internal.CustomBytesCalculation ...
        & parallel.internal.array.PlottableUsingGather ...
        & parallel.internal.array.HasFusedOperators

    properties ( Access = private, Hidden, Transient )
        Size = [0 0];
        ClassUnderlying = 'Invalid';
        IsReal = [];
        SparseFlag = 0;
        RemoteBytes = 0;
    end

    methods ( Access = public, Hidden )
        function varargout = fprintf(varargin)
            %FPRINTF overloaded for distributed arrays
            %   FPRINTF can operate on any combination of distributed arrays and standard
            %   MATLAB arrays by gathering the distributed arrays and then invoking
            %   the standard FPRINTF function. All valid syntaxes for FPRINTF are
            %   supported.
            %   
            %   See also FPRINTF, DISTRIBUTED.

            % We assume that the distributed data has been reduced before being printed
            % to file or screen, so we can just gather it.
            [varargin{:}] = gather(varargin{:});

            % Make sure we don't set 'ans'
            if nargout>0
                varargout{1} = fprintf(varargin{:});
            else
                fprintf(varargin{:});
            end
        end

        function tf = hCheckIsValid( obj )
        % Hidden access to private "isValid"
            tf = obj.isValid();
        end
        
        function bytes = hGetRemoteBytes( obj )
            bytes = obj.RemoteBytes;
        end

        function obj = hSendData( obj, region, data )
        % Hidden access to private "transferPortion"
            obj = transferPortion( obj, region, data );
        end

        function data = hRetrieveData( obj, region )
        % Hidden access to private "transferPortion"
            data = transferPortion( obj, region );
        end

        function C = mat2cell(A,varargin) %#ok<STOUT>
            %MAT2CELL Break distributed matrix up into a distributed cell array of underlying data.
            %
            %   This function is not supported for distributed arrays.

            error(message('parallel:distributed:Mat2cellNotImplemented', class(A)));
        end

        function p = properties(obj)
            % PROPERTIES Return properties of distributed array
            %   PROPERTIES(T)
            %
            %   See also PROPERTIES, DISTRIBUTED.
            propNames = properties(distributedutil.Allocator.extractTemplate(obj));
            
            if nargout == 0
                matlab.bigdata.internal.util.displayProperties(underlyingType(obj), propNames);
            else
                p = reshape(propNames, [], 1);
            end
        end

        function D = str2num(S) %#ok<STOUT>
            %STR2NUM Convert distributed array of strings to numeric array.
            %   
            %   This function is not supported for distributed arrays.
            %
            %   See also STR2DOUBLE, DISTRIBUTED.

            error(message('parallel:distributed:Str2numNotSupported', class(S)));
        end

        function out = superiorfloat( varargin )
            %SUPERIORFLOAT return 'double' or 'single' based on the superior input.
            %   SUPERIORFLOAT(A,B,...)
            %   
            %   Example:
            %       A = distributed.ones(5,'single');
            %       B = ones(3,'double')
            %       superiorfloat(A,B)
            %   
            %   See also SUPERIORFLOAT, DISTRIBUTED, DISTRIBUTED/ONES.

            out = 'double';
            for ii=1:nargin
                arg = varargin{ii};

                % logical and char counts as double (never dominant)
                if ischar(arg) || islogical(arg)
                   continue;
                end

                % non-floats should error
                if ~isfloat(arg)
                   error(message('MATLAB:datatypes:superiorfloat'));
                end

                % single dominates double
                if isequal(underlyingType(arg), 'single')
                   out = 'single';
                end
            end
        end
        
        function writecell(varargin)
            %WRITECELL Write a distributed cell array to a file.
            %   
            %   This function is not supported for distributed arrays. Use WRITE instead.
            %   
            %   See also WRITE, DISTRIBUTED.
            
            error(message('parallel:distributed:WriteFamilyNotSupported', 'WRITECELL'));
        end
        
        function writematrix(varargin)
            %WRITEMATRIX Write a distributed matrix to a file.
            %   
            %   This function is not supported for distributed arrays. Use WRITE instead.
            %   
            %   See also WRITE, DISTRIBUTED.
            
            error(message('parallel:distributed:WriteFamilyNotSupported', 'WRITEMATRIX'));
        end
        
        function writetable(varargin)
            %WRITETABLE Write a distributed table to a file.
            %   
            %   This function is not supported for distributed arrays. Use WRITE instead.
            %   
            %   See also WRITE, DISTRIBUTED.
            
            error(message('parallel:distributed:WriteFamilyNotSupported', 'WRITETABLE'));
        end
        
        function writetimetable(varargin)
            %WRITETIMETABLE Write a distributed timetable to a file.
            %   
            %   This function is not supported for distributed arrays. Use WRITE instead.
            %   
            %   See also WRITE, DISTRIBUTED.
            
            error(message('parallel:distributed:WriteFamilyNotSupported', 'WRITETIMETABLE'));
        end

        bytes = getDataSizeInBytes(obj);

        % Hidden because discouraged
        
        function typename = classUnderlying(obj)
            % Class of elements contained within a #class@array#
            % Use underlyingType instead.
            typename = underlyingType(obj);
        end
    end

    methods ( Access = private, Hidden )

        function tf = isValid( obj )
        % Defer to AbstractRemote to check whether or not this distributed is still
        % valid. Invalidation could occur either by save/load, or hidden
        % transfer, or by closing the pool.
            tf = obj.isResourceSetOpen();
        end

        function errorIfInvalid( obj )
        % Throw an exception as caller if the distributed is not valid.
            if ~obj.isResourceSetOpen()
                throwAsCaller( MException(message(...
                    'parallel:distributed:InvalidDistributed')));
            end
        end
    end

    methods ( Access = public )
        function obj = distributed( varargin )
        %DISTRIBUTED Create distributed array from local data
        %   D = DISTRIBUTED( X ) creates a distributed array from X. X is an
        %   array stored on the MATLAB client, and D is a distributed array
        %   stored on the workers of the open parallel pool.
        %
        %   Constructing a distributed from local data in this way is
        %   appropriate only if the MATLAB client can store the entirety of
        %   X in its memory.  Use one of the static constructor methods such
        %   as DISTRIBUTED.ONES, DISTRIBUTED.ZEROS, etc., to construct large
        %   distributed arrays.
        %
        %   D = DISTRIBUTED( DS ) creates a distributed array using data in 
        %   the datstore DS. If DS is a tabular datastore then the result is
        %   a distributed table. Other datastores result in a distributed
        %   cell array. DS must be a splittable datastore. 
        %
        %   D = DISTRIBUTED( CMP, DIM ) creates a distributed array from 
        %   Composite array CMP assuming distribution along dimension DIM.
        %   All entries the Composite array must have the same class.
        %   Dimensions other than the distribution dimension must match. 
        %   Composite tables or timetables are not supported. If DIM is
        %   omitted then the entries are assumed to be distributed in the
        %   first dimension.
        %
        %   D = DISTRIBUTED( X ) creates a distributed array from a tall
        %   array X that is defined in a parallel execution environment that
        %   distributed arrays support. D is a distributed array with
        %   distribution along the first dimension.
        %
        %   Examples:
        %   % directly create a small distributed array
        %   Nsmall = 50;
        %   D1 = distributed( magic( Nsmall ) );
        %
        %   % create a large distributed array using a static build method
        %   Nlarge = 1000;
        %   D2 = distributed.rand( Nlarge );
        %
        %   % create a large distributed array using a datastore
        %   varnames = {'ArrDelay', 'DepDelay', 'Origin', 'Dest'};
        %   ds = datastore('airlinesmall.csv', 'TreatAsMissing', 'NA', ...
        %                  'SelectedVariableNames', varnames);
        %   D3 = distributed(ds);
        %
        %   See also DISTRIBUTED, DISTRIBUTED.ONES, DISTRIBUTED.ZEROS.

            % distributed is not supported on local process pools running on Apple silicon Macs.
            if strcmp(computer, 'MACA64') && parallel.internal.pool.isDefaultPoolLocalProcesses()
                error(message("parallel:distributed:CodistributedDistributedUnsupportedOnMaca", "distributed"));
            end

            obj.IsReal = distributedutil.GuardedValue(@(x) islogical(x) && isscalar(x));

            if nargin == 0
                % Build empty distributed using the no-args codistributed constructor.
                obj = spmd_feval_fcn( @codistributed );

            elseif nargin == 1
                % Constructor should be idempotent
                if isa( varargin{1}, 'distributed' )
                    obj = varargin{1};
                    return;
                end
                % Allow construction from composite so long as the composite
                % is uniform type and complementary size.
                if isa( varargin{1}, 'Composite' )
                    obj = distributed.pBuildFromComposite( varargin{1}, 1 );
                    return
                end
                % Construct from datastore
                if isa( varargin{1}, 'matlab.io.datastore.Datastore' ) ...
                         || isa(varargin{1}, 'matlab.io.Datastore')
                    obj = distributed.pBuildFromDatastore( varargin{1} );
                    return
                end
                % Construct from tall
                if isa( varargin{1}, 'tall' )
                    obj = distributed.pBuildFromTall( varargin{1} );
                    return
                end

                % Cast construction - scatter the input argument
                try
                    obj = distributed.pScatter( varargin{1} );
                catch E
                    throw( E ); % Strip off stack.
                end

            elseif nargin == 2 && isa( varargin{1}, 'Composite' ) ...
                    && distributedutil.CodistParser.isValidDimension( varargin{2} )
                obj = distributed.pBuildFromComposite( varargin{1}, varargin{2} );
                return
                
            elseif nargin == 5 && ...
                    ischar( varargin{5} ) && ...
                    strcmp( varargin{5}, 'undoc:distributedFromSPMD' )
                % Build as return from SPMD block
                obj.Size            = varargin{1};
                obj.ClassUnderlying = varargin{2};
                obj.SparseFlag      = varargin{3};
                obj.RemoteBytes     = varargin{4};

            else
                error( message( 'parallel:distributed:DistributedUnexpectedConstructorArgs' ) );
            end
        end
    end

    methods (Access = private, Static)
        function obj = pScatter(data)

            % Canonical 'missing' version.
            if isa(data, 'missing')
                data = double(data);
            end

            if distributedutil.Allocator.supportsCreation(data)
                sizeData = size(data);
                % We get the number of workers and at the same time we set
                % the Composite for the local parts such that we know it 
                % uses all the workers.
                localParts = spmd_feval_fcn(@spmdSize);
                nWorkers = localParts{1};
                if istabular(data)
                    % tables and timetables are distributed by rows.
                    distDim = 1;
                else
                    distDim = distributedutil.Sizes.lastNonSingletonDimension(sizeData);
                end
                if issparse(data)
                    % For sparse data, get the NNZ per lastNonSingletonDimension
                    % and get a sparse and balanced codistributed obj
                    if isvector(data)
                        % For vectors, switch distDimension to get scalar nnz1D
                        distDim = iscolumn(data) + 1;
                    end
                    nnz1D = parallel.internal.codistextern.sparseNnzPerRowOrColumn( ...
                        data, distDim);
                    part = distributedutil.getCodistributor1dSparseBalancedPartition(sizeData(distDim), nnz1D, nWorkers);
                else
                    % Normal matrix data or other types that obey indexing
                    % rules.
                    part = distributedutil.getCodistributor1dDefaultPartition(sizeData(distDim), nWorkers);
                end
                % Compute the partition limits, for each worker ii the limits are given by
                % partLimits(ii, 1) and partLimits(ii, 2)
                partLimits = cumsum(part);
                partLimits = [1 partLimits(1:end-1)+1; partLimits]';
                S = substruct("()", repmat({':'}, 1, ndims(data)));
                for ii = 1:length(localParts)
                    % Local parts are slices of data in distDim
                    S.subs{distDim} = matlab.internal.ColonDescriptor(partLimits(ii, 1), partLimits(ii, 2));
                    localParts{ii} = subsref(data, S);
                    if isnumeric(data) && ~isreal(data)
                        % SUBSASGN drops zero complex part
                        localParts{ii} = complex(localParts{ii});
                    end
                end
                % Finally, build the distributed array from local parts by-passing checks by providing
                % as much information as we can.
                obj = spmd_feval_fcn(@(lp, dim, p, sz, flag) codistributed(lp, codistributor1d(dim, p, sz), flag), ...
                                     {localParts, distDim, part, sizeData, "undocumented:ConstructFromLocalParts"});
            else
                error(message("parallel:distributed:InvalidTypeForConstruction", ...
                              class(data)));
            end
        end

        function obj = pBuildFromComposite( cmp, dim )
            % Create a distributed array from composite.
            
            % Take care over empty parts. spmd_feval_fcn can't handle them,
            % so instead use a full SPMD.
            cmpExists = exist(cmp); %#ok<EXIST> composite/exist method has no second input
            spmd
                if cmpExists(spmdIndex)
                    obj = distributedutil.Allocator.createCodistributedFromComposite(dim, cmp);
                else
                    obj = distributedutil.Allocator.createCodistributedFromComposite(dim);
                end
            end
        end

        function obj = pBuildFromDatastore( ds )
            % Create a distributed array from a splittable datastore
            if ~isa(ds, 'matlab.io.datastore.SplittableDatastore') ...
                    && ~isa(ds, 'matlab.io.datastore.Partitionable')
                error(message('parallel:distributed:DatastoreNotSplittable'));
            end
            obj   = spmd_feval_fcn( @distributedutil.Allocator.createCodistributedFromDatastore, {ds} );
        end

        function obj = pBuildFromTall( tallArray )
            % Create a distributed array from a tall array
            internalFrame = matlab.bigdata.internal.InternalStackFrame; %#ok<NASGU>
            obj = parallel.internal.bigdata.distributed.tallToDistributed( tallArray );
        end

        function pInvalidMethodCall( methodName )
            throwAsCaller( MException(message(...
                'parallel:distributed:MethodAccessNotImplemented', ...
                methodName, methodName)));
        end
    end

    methods ( Access = public, Static, Sealed, Hidden )
        function obj = loadobj( obj )
        % Don't warn - the user was already warned at save time.
            parallel.internal.general.SerializationNotifier.notifyDeserialized(...
                class(obj));
        end
        
        Y = createArray(dims,F); % Hidden static helper to allow createArray to work
    end

    methods ( Access = public, Hidden )

        function obj = saveobj( obj, varargin )
            warning(message('parallel:distributed:DistributedSave'));
            parallel.internal.general.SerializationNotifier.notifySerialized(...
                class(obj));
        end
        function varargout = getCodistributor( varargin ) %#ok<STOUT>
            distributed.pInvalidMethodCall( 'getCodistributor' );
        end
        function varargout = getLocalPart( varargin ) %#ok<STOUT>
            distributed.pInvalidMethodCall( 'getLocalPart' );
        end
        function varargout = setLocalPart( varargin ) %#ok<STOUT>
            distributed.pInvalidMethodCall( 'setLocalPart' );
        end
        function varargout = globalIndices( varargin ) %#ok<STOUT>
            distributed.pInvalidMethodCall( 'globalIndices' );
        end
        function varargout = redistribute( varargin ) %#ok<STOUT>
            distributed.pInvalidMethodCall( 'redistribute' );
        end

        sz = numArgumentsFromSubscript(t, s, context);
        
        % Discouraged functions should be hidden
        [varargout] = datenum( varargin );
        [varargout] = datevec( varargin );
        [varargout] = isequalwithequalnans( varargin );
        
    end
    methods (Access = public)
        function [varargout] = abs( varargin )
        %ABS Absolute value of distributed array
        %   Y = ABS(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = complex(3*distributed.ones(N),4*distributed.ones(N))
        %       absD = abs(D)
        %   
        %   compare with
        %   absD2 = sqrt(real(D).^2 + imag(D).^2)
        %   
        %   See also ABS, DISTRIBUTED.

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

        function [varargout] = acos( varargin )
        %ACOS Inverse cosine of distributed array, result in radians
        %   Y = ACOS(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = acos(D)
        %   
        %   See also ACOS, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = acosd( varargin )
        %ACOSD Inverse cosine of distributed array, result in degrees
        %   Y = ACOSD(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = acosd(D)
        %   
        %   See also ACOSD, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = acosh( varargin )
        %ACOSH Inverse hyperbolic cosine of distributed array
        %   Y = ACOSH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = acosh(D)
        %   
        %   See also ACOSH, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = acot( varargin )
        %ACOT Inverse cotangent of distributed array, result in radians
        %   Y = ACOT(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = acot(D)
        %   
        %   See also ACOT, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = acotd( varargin )
        %ACOTD Inverse cotangent of distributed array, result in degrees
        %   Y = ACOTD(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = acotd(D)
        %   
        %   See also ACOTD, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = acoth( varargin )
        %ACOTH Inverse hyperbolic cotangent of distributed array
        %   Y = ACOTH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.inf(N);
        %       E = acoth(D)
        %   
        %   See also ACOTH, DISTRIBUTED, DISTRIBUTED/INF.

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

        function [varargout] = acsc( varargin )
        %ACSC Inverse cosecant of distributed array, result in radian
        %   Y = ACSC(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = acsc(D)
        %   
        %   See also ACSC, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = acscd( varargin )
        %ACSCD Inverse cosecant of distributed array, result in degrees
        %   Y = ACSCD(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = acscd(D)
        %   
        %   See also ACSCD, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = acsch( varargin )
        %ACSCH Inverse hyperbolic cosecant of distributed array
        %   Y = ACSCH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.inf(N);
        %       E = acsch(D)
        %   
        %   See also ACSCH, DISTRIBUTED, DISTRIBUTED/INF.

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

        function [varargout] = all( varargin )
        %ALL True if all elements of a distributed vector are nonzero
        %   A = ALL(D)
        %   A = ALL(D,DIM)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1,N)
        %       t = all(D)
        %   
        %   returns t the distributed logical scalar with value true.
        %   
        %   See also ALL, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = allfinite( varargin )
        %ALLFINITE True if every element of a distributed array is finite.
        %   TF = ALLFINITE(X)
        %   
        %   See also ALLFINITE, distributed.
        %   

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

        function [varargout] = and( varargin )
        %& Logical AND for distributed array
        %   C = A & B
        %   C = AND(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.eye(N);
        %       D2 = distributed.rand(N);
        %       D3 = D1 & D2
        %   
        %   returns D3 a N-by-N distributed logical array with the
        %   diagonal populated with true values.
        %   
        %   See also AND, DISTRIBUTED, DISTRIBUTED/EYE.
        %   

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

        function [varargout] = angle( varargin )
        %ANGLE Phase angle of distributed array
        %   Y = ANGLE(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = 1i * distributed.ones(N);
        %       E = angle(D)
        %   
        %   See also ANGLE, DISTRIBUTED, DISTRIBUTED/SQRT.
        %   

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

        function [varargout] = any( varargin )
        %ANY True if any element of a distributed vector is nonzero or TRUE
        %   A = ANY(D)
        %   A = ANY(D,DIM)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.eye(N);
        %       t = any(D,1)
        %   
        %   returns t the distributed row vector equal to
        %   distributed.true(1,N).
        %   
        %   See also ANY, DISTRIBUTED, DISTRIBUTED/EYE, DISTRIBUTED/TRUE.

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

        function [varargout] = anymissing( varargin )
        %ANYMISSING True if at least one element of a distributed array is missing.
        %   TF = ANYMISSING(X)
        %   
        %   See also ANYMISSING, distributed.
        %   

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

        function [varargout] = anynan( varargin )
        %ANYNAN True if at least one element of a distributed array is Not-a-Number.
        %   TF = ANYNAN(X)
        %   
        %   See also ANYNAN, distributed.
        %   

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

        function [varargout] = arrayfun( varargin )
        %ARRAYFUN Apply a function to each element of distributed array
        %   A = ARRAYFUN(FUN, B) applies the function specified by FUN to each element
        %   of the distributed array B, and returns the results in distributed array
        %   A.  The array A is the same size as B, and the (I,J,...)th element of A is 
        %   equal to FUN(B(I,J,...)). FUN is a function handle to a function that takes
        %   one input argument and returns a scalar value. FUN must return values of 
        %   the same class each time it is called.  The order in which ARRAYFUN computes
        %   elements of A is not specified and should not be relied on.
        %   
        %   A = ARRAYFUN(FUN, B, C,  ...) evaluates FUN using elements of the arrays
        %   B, C,  ... as input arguments.  The (I,J,...)th element of the
        %   distributed array A is equal to FUN(B(I,J,...), C(I,J,...), ...).  
        %   All input arguments must be of the same size.
        %   
        %   [A, B, ...] = ARRAYFUN(FUN, C, ...), where FUN is a function handle
        %   to a function that returns multiple outputs, returns distributed arrays
        %   A, B,..., each corresponding to one of the output arguments of FUN.  ARRAYFUN
        %   calls FUN each time with as many outputs as there are in the call to ARRAYFUN.
        %   FUN can return output arguments having different classes, but the class of
        %   each output must be the same each time FUN is called. This means that all
        %   elements of A must be the same class; B can be a different class from A, but
        %   all elements of B must be of the same class.
        %   
        %   [A, ...] = arrayfun(FUN, B,  ..., 'Param1', val1, ...) enables you to
        %   specify optional parameter name/value pairs.  Parameters are:
        %   
        %      'UniformOutput' -- a logical value indicating whether or not the
        %      output(s) of FUN can be returned without encapsulation in a cell
        %      array. If true (the default), FUN must return scalar values that can
        %      be concatenated into an array; the outputs must be of the 
        %      following types:  numeric, logical, char, struct, cell.  If false, 
        %      arrayfun returns a cell array (or multiple cell arrays), where the 
        %      (I,J,...)th cell contains the value FUN(B(I,J,...), ...); and 
        %      the outputs can be of any type.
        %    
        %      'ErrorHandler' -- a function handle, specifying the function
        %      MATLAB is to call if the call to FUN fails.   The error handling
        %      function will be called with the following input arguments:
        %        -  a structure, with the fields:  "identifier", "message", and
        %           "index", respectively containing the identifier of the error
        %           that occurred, the text of the error message, and the linear 
        %           index into the input array(s) for which the error occurred. 
        %        -  the set of input arguments for which the call to the function
        %           failed.
        %    
        %      The error handling function should either rethrow an error, or
        %      return the same number of outputs as FUN.  These outputs are then
        %      returned as the outputs of arrayfun.  If 'UniformOutput' is true,
        %      the outputs of the error handler must also be scalars of the same
        %      type as the outputs of FUN. Example:
        %    
        %      function [A, B] = errorFunc(S, varargin)
        %          warning(S.identifier, S.message); A = NaN; B = NaN;
        %    
        %      If an error handler is not specified, the error from the call to 
        %      FUN will be rethrown.
        %   
        %   Examples
        %   If the MATLAB function aFunction is defined as follows:
        %   function [o1, o2] = aFunction(a, b, c)
        %       o1 = a + b;
        %       o2 = o1 .* c + 2;
        %     
        %   Then this can be executed as follows:
        %       N = 1000;
        %       s1 = distributed.rand(N);
        %       s2 = distributed.rand(N);
        %       s3 = distributed.rand(N);
        %       [o1, o2] = arrayfun(@aFunction, s1, s2, s3)
        %   
        %   See also  ARRAYFUN, DISTRIBUTED, function_handle, gather

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

        function [varargout] = asec( varargin )
        %ASEC Inverse secant of distributed array, result in radians
        %   Y = ASEC(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = asec(D)
        %   
        %   See also ASEC, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = asecd( varargin )
        %ASECD Inverse secant of distributed array, result in degrees
        %   Y = ASECD(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = asecd(D)
        %   
        %   See also ASECD, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = asech( varargin )
        %ASECH Inverse hyperbolic secant of distributed array
        %   Y = ASECH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = asech(D)
        %   
        %   See also ASECH, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = asin( varargin )
        %ASIN Inverse sine of distributed array, result in radians
        %   Y = ASIN(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = asin(D)
        %   
        %   See also ASIN, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = asind( varargin )
        %ASIND Inverse sine of distributed array, result in degrees
        %   Y = ASIND(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = asind(D)
        %   
        %   See also ASIND, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = asinh( varargin )
        %ASINH Inverse hyperbolic sine of distributed array
        %   Y = ASINH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = asinh(D)
        %   
        %   See also ASINH, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = atan( varargin )
        %ATAN Inverse tangent of distributed array, result in radians
        %   Y = ATAN(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = atan(D)
        %   
        %   See also ATAN, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = atan2( varargin )
        %ATAN2 Four quadrant inverse tangent of distributed array
        %   Z = ATAN2(Y,X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = atan2(D,D)
        %   
        %   See also ATAN2, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = atan2d( varargin )
        %ATAN2D Four quadrant inverse tangent of distributed array, result in degrees
        %   Z = ATAN2D(Y,X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = atan2d(D,D)
        %   
        %   See also ATAN2D, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = atand( varargin )
        %ATAND Inverse tangent of distributed array, result in degrees
        %   Y = ATAND(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = atand(D)
        %   
        %   See also ATAND, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = atanh( varargin )
        %ATANH Inverse hyperbolic tangent of distributed array
        %   Y = ATANH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = atanh(D)
        %   
        %   See also ATANH, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = bandwidth( varargin )
        %BANDWIDTH  Return the lower and upper bandwidth of a distributed matrix.
        %   
        %   [LOWER,UPPER] = bandwidth(X)
        %   LOWER = bandwidth(X,'lower')
        %   UPPER = bandwidth(X,'upper')
        %   
        %   Example:
        %      A = distributed([2 3 0 0 ; 1 -2 -3 0; 0 -1 2 3 ; 0 0 -1 2]);
        %      [lower, upper] = bandwidth(A,1,1) % = 1, 1
        %   
        %   See also ISBANDED, DISTRIBUTED, DISTRIBUTED/ISBANDED.
        %   

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

        function [varargout] = besselh( varargin )
        %BESSELH Bessel function of the third kind (Hankel function) for distributed arrays.
        %       H = besselh(NU,Z)
        %       H = besselh(NU,K,Z)
        %       H = besselh(NU,K,Z,SCALE)
        %   
        %       Class support for inputs NU and Z:
        %          float: double, single
        %       
        %   Example:
        %       [X,Y] = meshgrid(-4:0.025:2,-1.5:0.025:1.5);
        %       Z = distributed(X+iY);
        %       H = besselh(0,1,Z);
        %   
        %   See also BESSELH, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = besseli( varargin )
        %BESSELI Modified Bessel function of the first kind for distributed arrays.
        %       I = besseli(NU,Z)
        %       I = besseli(NU,Z,SCALE)
        %    
        %       Class support for inputs NU and Z:
        %          float: double, single
        %   
        %   Example:
        %       z = rand(10, 1, 'distributed');
        %       nu = 0.5;
        %       besseli(nu, z)
        %   
        %   See also BESSELI, DISTRIBUTED.
        %   

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

        function [varargout] = besselj( varargin )
        %BESSELJ Bessel function of the first kind for distributed arrays.
        %       J = BESSELJ(NU,Z)
        %       J = BESSELJ(NU,Z,SCALE)
        %   
        %       Class support for inputs NU and Z:
        %          float: double, single
        %   
        %   Example:
        %       z = rand(10, 1, 'distributed');
        %       nu = 1;
        %       besselj(nu, z)
        %   
        %   See also BESSELJ, DISTRIBUTED.

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

        function [varargout] = besselk( varargin )
        %BESSELK Modified Bessel function of the second kind for distributed arrays.
        %       K = besselk(NU,Z)
        %       K = besselk(NU,Z,SCALE)
        %    
        %       Class support for inputs NU and Z:
        %          float: double, single
        %   
        %   Example:
        %       z = rand(10, 1, 'distributed');
        %       nu = 0.5;
        %       besselk(nu, z)
        %   
        %   See also BESSELK, DISTRIBUTED.
        %   

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

        function [varargout] = bessely( varargin )
        %BESSELY Bessel function of the second kind for distributed arrays.
        %       Y = BESSELY(NU,Z)
        %       Y = BESSELY(NU,Z,SCALE)
        %   
        %       Class support for inputs NU and Z:
        %          float: double, single
        %   
        %   Example:
        %       z = rand(10, 1, 'distributed');
        %       nu = 1;
        %       bessely(nu, z)
        %   
        %   See also BESSELY, DISTRIBUTED.

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

        function [varargout] = beta( varargin )
        %BETA  Beta function for distributed arrays
        %   Y = BETA(Z,W) computes the beta function for corresponding elements
        %   of Z and W. The arrays Z and W must be real and nonnegative. Both arrays
        %   must be the same size, or either can be scalar.
        %   
        %   Example:
        %       N = 1000;
        %       Z = rand(N, 'distributed');
        %       W = rand(N, 'distributed');
        %       beta(Z, W)
        %   
        %   See also BETA, DISTRIBUTED/BETALN, DISTRIBUTED.

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

        function [varargout] = betainc( varargin )
        %BETAINC  Incomplete beta function for distributed arrays
        %   Y = BETAINC(X,Z,W)
        %   Y = BETAINC(X,Z,W,TAIL)
        %   
        %   Example:
        %       N = 1000;
        %       X = 0.5;
        %       Z = rand(N, 'distributed');
        %       W = 3;
        %       betainc(X,Z,W)
        %   
        %   See also BETAINC, DISTRIBUTED/BETA, DISTRIBUTED/BETAINCINV, DISTRIBUTED.
        %   

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

        function [varargout] = betaincinv( varargin )
        %BETAINCINV  Inverse incomplete beta function for distributed arrays
        %   X = BETAINCINV(Y,Z,W)
        %   X = BETAINCINV(Y,Z,W,TAIL)
        %   
        %   Example:
        %       N = 1000;
        %       Y = 0.5;
        %       Z = rand(N, 'distributed');
        %       W = 3;
        %       betaincinv(Y,Z,W)
        %   
        %   See also BETAINCINV, DISTRIBUTED/BETA, DISTRIBUTED/BETAINC, DISTRIBUTED.
        %   

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

        function [varargout] = betaln( varargin )
        %BETALN  Logarithm of beta function for distributed arrays
        %   Y = BETALN(Z,W) computes the natural logarithm of the beta function for
        %   corresponding elements of Z and W. The arrays Z and W must be real and 
        %   nonnegative. Both arrays must be the same size, or either can be scalar.
        %   
        %   Example:
        %       N = 1000;
        %       Z = rand(N, 'distributed');
        %       W = rand(N, 'distributed');
        %       betaln(Z, W)
        %   
        %   See also BETALN, DISTRIBUTED/BETA, DISTRIBUTED.

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

        function [varargout] = between( varargin )
        %BETWEEN Difference between datetimes as calendar durations.
        %   
        %   D = BETWEEN(T1,T2)
        %   D = BETWEEN(T1,T2,COMPONENTS)
        %   
        %   See also BETWEEN.
        %   

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

        function [varargout] = bicg( varargin )
        %BICG   BiConjugate Gradients Method distributed array.
        %   X = BICG(A,B)
        %   X = BICG(A,B)
        %   X = BICG(A,B,TOL)
        %   X = BICG(A,B,TOL,MAXIT)
        %   X = BICG(A,B,TOL,MAXIT,M)
        %   X = BICG(A,B,TOL,MAXIT,M1,M2)
        %   X = BICG(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = BICG(A,B,...)
        %   [X,FLAG,RELRES] = BICG(A,B,...)
        %   [X,FLAG,RELRES,ITER] = BICG(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = BICG(A,B,...)
        %   
        %   Limitations:
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using BICG to solve a large system of distributed array data:
        %       n = 1e6; 
        %       dOnes = distributed.ones(n,1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -dOnes],-1:1,n,n);
        %       db = full(sum(dA,2)); 
        %       tol = 1e-8; 
        %       maxit = 30;
        %       dM = spdiags(4*dOnes, 0, n, n);
        %       
        %       dX = BICG(dA,db,tol,maxit, dM)
        %   
        %   See also BICG, DISTRIBUTED.

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

        function [varargout] = bicgstab( varargin )
        %BICGSTAB   BiConjugate Gradients Stabilized Method for distributed array.
        %   X = BICGSTAB(A,B)
        %   X = BICGSTAB(A,B)
        %   X = BICGSTAB(A,B,TOL)
        %   X = BICGSTAB(A,B,TOL,MAXIT)
        %   X = BICGSTAB(A,B,TOL,MAXIT,M)
        %   X = BICGSTAB(A,B,TOL,MAXIT,M1,M2)
        %   X = BICGSTAB(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = BICGSTAB(A,B,...)
        %   [X,FLAG,RELRES] = BICGSTAB(A,B,...)
        %   [X,FLAG,RELRES,ITER] = BICGSTAB(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = BICGSTAB(A,B,...)
        %   
        %   Limitations:
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using BICGSTAB to solve a large system of distributed array data:
        %       n = 100; 
        %       dOnes = distributed.ones(n,1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -dOnes],-1:1,n,n);
        %       db = full(sum(dA,2)); 
        %       tol = 1e-10; 
        %       maxit = 50;
        %       dM = spdiags(4*dOnes, 0, n, n);
        %   
        %       dX = BICGSTAB(dA, db, tol, maxit, dM);
        %   
        %   See also BICGSTAB, DISTRIBUTED, ONES, SPDIAGS, SUM.

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

        function [varargout] = bicgstabl( varargin )
        %BICGSTABL   BiConjugate Gradients Stabilized(l) Method for distributed array.
        %   X = BICGSTABL(A,B)
        %   X = BICGSTABL(A,B)
        %   X = BICGSTABL(A,B,TOL)
        %   X = BICGSTABL(A,B,TOL,MAXIT)
        %   X = BICGSTABL(A,B,TOL,MAXIT,M)
        %   X = BICGSTABL(A,B,TOL,MAXIT,M1,M2)
        %   X = BICGSTABL(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = BICGSTABL(A,B,...)
        %   [X,FLAG,RELRES] = BICGSTABL(A,B,...)
        %   [X,FLAG,RELRES,ITER] = BICGSTABL(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = BICGSTABL(A,B,...)
        %      
        %   Note that B must be a non-sparse column vector.
        %   
        %   Limitations:
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using BICGSTABL to solve a large system of distributed array data:
        %       n = 100; 
        %       dOnes = distributed.ones(n,1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -dOnes],-1:1,n,n);
        %       db = full(sum(A,2)); 
        %       tol = 1e-10; 
        %       maxit = 15; 
        %       dM = spdiags(4*dOnes, 0, n, n);
        %       
        %       dX = BICGSTABL(dA, db, tol, maxit, dM)
        %   
        %   See also BICGSTABL, DISTRIBUTED, ONES, SPDIAGS, SUM.

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

        function [varargout] = bitand( varargin )
        %BITAND Bit-wise AND of distributed array
        %   C = BITAND(A,B)
        %   
        %   The following syntaxes are not supported for distributed array:
        %   C = BITAND(A,B,ASSUMEDTYPE)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.ones(N,'uint32');
        %       D2 = triu(D1);
        %       D3 = bitand(D1,D2)
        %   
        %   See also BITAND, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = bitor( varargin )
        %BITOR Bit-wise OR of distributed array
        %   C = BITOR(A,B)
        %   
        %   The following syntaxes are not supported for distributed array:
        %   C = BITOR(A,B,ASSUMEDTYPE)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.ones(N,'uint32');
        %       D2 = triu(D1);
        %       D3 = bitor(D1,D2)
        %   
        %   See also BITOR, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = bitxor( varargin )
        %BITXOR Bit-wise XOR of distributed array
        %   C = BITXOR(A,B)
        %   
        %   The following syntaxes are not supported for distributed array:
        %   C = BITXOR(A,B,ASSUMEDTYPE)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.ones(N,'uint32');
        %       D2 = triu(D1);
        %       D3 = bitxor(D1,D2)
        %   
        %   See also BITXOR, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = bsxfun( varargin )
        %BSXFUN  Binary Singleton Expansion Function for distributed array
        %   C = BSXFUN(FUN,A,B) applies the element-by-element binary operation
        %   specified by the function handle FUN to arrays A and B, with singleton
        %   expansion enabled.
        %   
        %   The corresponding dimensions of A and B must be equal to each other, or 
        %   equal to one. Whenever a dimension of A or B is singleton (equal to 
        %   one), BSXFUN virtually replicates the array along that dimension to 
        %   match the other array. In the case where a dimension of A or B is 
        %   singleton and the corresponding dimension in the other array is zero,
        %   BSXFUN virtually diminishes the singleton dimension to zero.
        %    
        %   The size of the output array C is equal to
        %   max(size(A),size(B)).*(size(A)>0 & size(B)>0). For example, if
        %   size(A) == [2 5 4] and size(B) == [2 1 4 3], then size(C) == [2 5 4 3].
        %    
        %   Examples:
        %   %Subtract the column means from the matrix A:
        %   
        %       A = distributed.rand(8);
        %       A = bsxfun(@minus, A, mean(A));
        %   
        %   %Compute z(x, y) = x.*sin(y) on a grid:
        %         x = distributed.colon(1,10);
        %         y = x.';
        %         z = bsxfun(@(x, y) x.*sin(y), x, y);
        %    
        %   See also BSXFUN, DISTRIBUTED, function_handle, gather

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

        function [varargout] = caldays( varargin )
        %CALDAYS Create calendar durations from numeric values in units of calendar days.
        %   
        %   D = CALDAYS(N)
        %    
        %   See also CALDAYS, distributed.
        %   

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

        function [varargout] = calendarDuration( varargin )
        %CALENDARDURATION Create an array of distributed CALENDARDURATIONs.
        %   
        %   D = CALENDARDURATION(DV)
        %   D = CALENDARDURATION(Y,MO,D)
        %   D = CALENDARDURATION(Y,MO,D,H,MI,S)
        %   D = CALENDARDURATION(...,'Format',FMT)
        %    
        %   See also CALENDARDURATION, distributed.
        %   

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

        function [varargout] = calmonths( varargin )
        %CALMONTHS Create calendar durations from numeric values in units of calendar months.
        %   
        %   M = CALMONTHS(N)
        %    
        %   See also CALMONTHS, distributed.
        %   

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

        function [varargout] = calquarters( varargin )
        %CALQUARTERS Create calendar durations from numeric values in units of calendar quarters.
        %   
        %   Q = CALQUARTERS(N)
        %    
        %   See also CALQUARTERS, distributed.
        %   

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

        function [varargout] = calweeks( varargin )
        %CALWEEKS Create calendar durations from numeric values in units of calendar weeks.
        %   
        %   W = CALWEEKS(N)
        %    
        %   See also CALWEEKS, distributed.
        %   

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

        function [varargout] = calyears( varargin )
        %CALYEARS Create calendar durations from numeric values in units of calendar years.
        %   
        %   Y = CALYEARS(N)
        %    
        %   See also CALYEARS, distributed.
        %   

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

        function [varargout] = cast( varargin )
        %CAST Cast a distributed array to a different data type or class.
        %   B = CAST(A,NEWCLASS)
        %   
        %   B = CAST(A, 'like', Y) converts A to the same underlying data type and 
        %   sparsity as the variable Y. If A and Y are both real, then B is also real. 
        %   B is complex otherwise.  B is a distributed array if and only if Y is a 
        %   distributed array.
        %   
        %   Example:
        %       N = 1000;
        %       A = distributed.ones(N,'uint32');
        %       B = cast(Du,'single');
        %       classA = underlyingType(A);
        %       classB = underlyingType(B);
        %   
        %   casts the distributed uint32 array A to the distributed single array
        %   B. classA is 'uint32', while classB is 'single'.
        %   
        %   See also CAST, DISTRIBUTED, DISTRIBUTED/ONES, 
        %   DISTRIBUTED/underlyingType.

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

        function [varargout] = cat( varargin )
        %CAT Concatenate distributed arrays
        %   C = CAT(DIM,A,B,...) implements CAT(DIM,A,B,...) for distributed arrays.
        %   
        %   Example:
        %       N1 = 500;
        %       N2 = 1000;
        %       D1 = distributed.ones(N1,N2);
        %       D2 = distributed.zeros(N1,N2);
        %       D3 = cat(1,D1,D2) % D3 is 1000-by-1000
        %       D4 = cat(2,D1,D2) % D4 is 500-by-2000
        %   
        %   See also CAT, VERTCAT, HORZCAT, DISTRIBUTED, DISTRIBUTED/ONES, 
        %   DISTRIBUTED/ZEROS.

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

        function [varargout] = categorical( varargin )
        %CATEGORICAL Create a distributed array of CATEGORICALs.
        %   C = CATEGORICAL(DATA)
        %   C = CATEGORICAL(DATA,VALUESET)
        %   C = CATEGORICAL(DATA,VALUESET,CATEGORYNAMES)
        %   C = CATEGORICAL(DATA, ..., 'Ordinal',ORD)
        %   C = CATEGORICAL(DATA, ..., 'Protected',PROTECT)
        %    
        %   LIMITATION:
        %   The order of the categories when executing C = categorical(DATA) is
        %   undefined. Use VALUESET and CATEGORYNAMES to enforce the order
        %   
        %   See also: CATEGORICAL, distributed.
        %   

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

        function [varargout] = categories( varargin )
        %CATEGORIES Get a list of a categorical array's categories.
        %   S = CATEGORIES(A)
        %   
        %   Limitations:
        %   'OutputType' name-value argument is not supported.
        %   
        %   See also: CATEGORIES, distributed.
        %   

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

        function [varargout] = ceil( varargin )
        %CEIL Round distributed array towards plus infinity
        %   Y = CEIL(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1,N)./2
        %       E = ceil(D)
        %   
        %   See also CEIL, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = cell2mat( varargin )
        %CELL2MAT Convert the contents of a distributed cell array into a single matrix
        %   M = CELL2MAT(C)
        %   
        %   Example:
        %       N = 1000;
        %       c = distributed(num2cell(1:N))
        %       m = cell2mat(c)
        %       classc = underlyingType(c)
        %       classm = underlyingType(m)
        %   
        %   takes the 1-by-N distributed cell array c and returns the
        %   distributed double row vector m equal to distributed.colon(1, N).
        %   classc is 'cell' while classm is 'double'.
        %   
        %   See also CELL2MAT, DISTRIBUTED, DISTRIBUTED/COLON, 
        %   DISTRIBUTED/CELL, DISTRIBUTED/underlyingType.

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

        function [varargout] = cell2struct( varargin )
        %CELL2STRUCT Convert distributed cell array to structure array
        %   S = CELL2STRUCT(C,FIELDS,DIM)
        %   
        %   Example:
        %       N = 1000;
        %       C = distributed(repmat({rand(7); char(64+7)}, 1, N))
        %       f = {'matrix','name'}
        %       S = cell2struct(C,f,1)
        %       classC = underlyingType(C)
        %       classS = underlyingType(S)
        %   
        %   takes the 2-by-N distributed cell array c and converts it into a
        %   N-by-1 distributed struct array s, with fields named 'matrix' and
        %   'name'.
        %   classC is 'cell' while classS is 'struct'.
        %   
        %   See also CELL2STRUCT, DISTRIBUTED.

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

        function [varargout] = cellfun( varargin )
        %CELLFUN Apply a function to each cell of a distributed cell array
        %   A = CELLFUN(FUN, C)
        %   A = CELLFUN(FUN, B, C, ...)
        %   [A, B, ...] = CELLFUN(FUN, C,  ..., 'Param1', val1, ...)
        %   
        %   Example:
        %       N = 1000;
        %       C = distributed.cell(N)
        %       T = cellfun(@isempty,C)
        %       classC = underlyingType(C)
        %       classT = underlyingType(T)
        %   
        %   returns a N-by-N distributed logical matrix T the same as
        %   distributed.true(N).
        %   classC is 'cell' while classT is 'logical'.
        %   
        %   See also  CELLFUN, DISTRIBUTED, DISTRIBUTED/CELL.

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

        function [varargout] = cellstr( varargin )
        %CELLSTR Convert distributed array to cell array of character vector
        %   
        %   C = CELLSTR(S)
        %   
        %   Supported syntaxes for CALENDARDURATION, DATETIME, DURATION:
        %   C = CELLSTR(T)
        %   C = CELLSTR(T,FMT)
        %   C = CELLSTR(T,FMT,LOCALE)
        %   
        %   See also DATETIME/CELLSTR, CELLSTR.
        %   

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

        function [varargout] = cgs( varargin )
        %CGS   Conjugate Gradients Squared Method for distributed array.
        %   X = CGS(A,B)
        %   X = CGS(A,B)
        %   X = CGS(A,B,TOL)
        %   X = CGS(A,B,TOL,MAXIT)
        %   X = CGS(A,B,TOL,MAXIT,M)
        %   X = CGS(A,B,TOL,MAXIT,M1,M2)
        %   X = CGS(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = CGS(A,B,...)
        %   [X,FLAG,RELRES] = CGS(A,B,...)
        %   [X,FLAG,RELRES,ITER] = CGS(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = CGS(A,B,...)
        %      
        %   Limitations:
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using CGS to solve a large system of distributed array data:
        %       A = delsq(numgrid('S',100)); % A sparse SPD system
        %       b = full(sum(A,2)); 
        %       
        %       dA = distributed(A);
        %       db = distributed(b);
        %       tol = 1e-6; 
        %       maxit = 500; 
        %       dX = cgs(dA,db,tol,maxit)
        %   
        %   See also CGS, DISTRIBUTED.

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

        function [varargout] = char( varargin )
        %CHAR Convert a distributed array to a distributed character array (string)
        %   S = CHAR(X)
        %   
        %   The syntax S = CHAR(T1,T2,T3, ...) is not supported.
        %   
        %   Example:
        %       N = 1000;
        %       D = 65*distributed.ones(N,'uint16');
        %       C = char(D)
        %       classD = underlyingType(D)
        %       classC = underlyingType(C)
        %   
        %   converts the N-by-N distributed uint16 matrix D into a
        %   distributed char array C.
        %   classD is 'uint16' while classC is 'char'.
        %   
        %   See also CHAR, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = chol( varargin )
        %CHOL Cholesky factorization of distributed array
        %   R = CHOL(D)
        %   [R,p] = CHOL(D)
        %   L = CHOL(D, 'lower')
        %   [L,p] = CHOL(D, 'lower')
        %   
        %   D must be a full distributed matrix of floating point numbers (single or double).
        %   Sparse arrays are not supported. The 'vector' option is not supported.
        %   
        %   Example:
        %       N = 1000;
        %       D = 1 + distributed.eye(N);
        %       [R,p] = chol(D);
        %       isequal(p, 0) % true
        %       norm(R'*R - D, 1)
        %   
        %   See also CHOL, DISTRIBUTED, DISTRIBUTED/EYE.

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

        function [varargout] = circshift( varargin )
        %CIRCSHIFT Shift positions of a distributed array elements circularly.
        %   Y = CIRCSHIFT(X,K)
        %   Y = CIRCSHIFT(X,K,DIM)
        %   Y = CIRCSHIFT(X,V)
        %   
        %   See also CIRCSHIFT, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = complex( varargin )
        %COMPLEX Construct complex distributed array from real and imaginary parts
        %   C = COMPLEX(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = 3*distributed.ones(N);
        %       D2 = 4*distributed.ones(N);
        %       E = complex(D1,D2)
        %   
        %   See also COMPLEX, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = compose( varargin )
        %COMPOSE Fill holes in string with formatted data.
        %   S = COMPOSE(TXT)
        %   S = COMPOSE(FORMAT,A)
        %   S = COMPOSE(FORMAT,A1,...,AN)
        %   
        %   See also COMPOSE, distributed/STRING.
        %   

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

        function [varargout] = cond( varargin )
        %COND Condition number with respect to inversion for distributed array.
        %   COND(X)
        %   COND(X,P) 
        %    
        %   Class support for input X:
        %   float: double, single
        %   
        %   COND for distributed inputs does not support sparse inputs.
        %   
        %   Example:
        %       N = 1024;
        %       A = diag(distributed.colon(1,N));
        %       C = cond(A, 1) % returns N
        %   
        %   See also COND, DISTRIBUTED.

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

        function [varargout] = conj( varargin )
        %CONJ Complex conjugate of distributed array
        %   Y = CONJ(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = complex(3*distributed.ones(N),4*distributed.ones(N))
        %       E = conj(D)
        %   
        %   See also CONJ, DISTRIBUTED.

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

        function [varargout] = contains( varargin )
        %CONTAINS True if pattern is found in string
        %   
        %   TF = CONTAINS(S,PATTERN)
        %   TF = CONTAINS(S,PATTERN,'IgnoreCase',IGNORE)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also CONTAINS.
        %   

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

        function [varargout] = conv( varargin )
        %CONV Convolution and polynomial multiplication of distributed arrays.
        %   C = CONV(A, B)
        %   C = CONV(A, B, SHAPE)
        %   
        %   A and B must be numeric or logical arrays. Both real and complex types are supported. 
        %   
        %   Example:
        %            N = 1000;
        %            A = distributed.ones(N, 1);
        %            B = distributed.rand(2*N,1);
        %            C = conv(A, B);
        %    
        %   See also CONV, DISTRIBUTED, DISTRIBUTED/CONV2, DISTRIBUTED/FILTER.
        %   
        %   

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

        function [varargout] = conv2( varargin )
        %CONV2 Two dimensional convolution of distributed arrays.
        %   C = CONV2(A, B)
        %   C = CONV2(H1, H2, A)
        %   C = CONV2(..., SHAPE)
        %   
        %   A, B, H1, H2 must be numeric or logical arrays. Both real and complex types are supported.
        %   H1 and H2 must not be distributed arrays.
        %   
        %   Example:
        %            N = 500;
        %            A = distributed.ones(2*N, N);
        %            B = distributed.rand(N);
        %            C = conv2(A, B);
        %   
        %   See also CONV2, DISTRIBUTED, DISTRIBUTED/CONV, DISTRIBUTED/FILTER2.
        %   
        %   

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

        function [varargout] = convn( varargin )
        %CONVN N-dimensional convolution of distributed arrays.
        %   C = CONVN(A, B)
        %   C = CONVN(A, B, SHAPE)
        %   
        %   A and B must be numeric or logical arrays. Both real and complex types are supported.
        %   
        %   Example:
        %       N = 1000;
        %       A = distributed.rand(2*N, N, 3);
        %       B = distributed.rand(3, 3, 2);
        %       C = convn(A, B);
        %   
        %   See also CONV, CONVN, DISTRIBUTED, DISTRIBUTED/CONV, DISTRIBUTED/CONVN, DISTRIBUTED/FILTER2.

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

        function [varargout] = corrcoef( varargin )
        %CORRCOEF Correlation coefficients.
        %   R = CORRCOEF(X)
        %   R = CORRCOEF(X,Y)
        %   [R,P] = CORRCOEF(...)
        %   [R,P,RLO,RUP] = CORRCOEF(...)
        %   [...] = CORRCOEF(...,'PARAM1',VAL1,'PARAM2',VAL2,...)
        %   
        %   Example:
        %       X = rand(10000, 10, 'distributed'); % Uncorrelated data
        %       X(:,4) = sum(X, 2); % Introduce correlation
        %       R = corrcoef(X);    % Compute sample correlation
        %   
        %   See also CORRCOEF, DISTRIBUTED, COV, DISTRIBUTED/VAR, STD.

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

        function [varargout] = cos( varargin )
        %COS Cosine of distributed array in radians
        %   Y = COS(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = cos(D)
        %   
        %   See also COS, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = cosd( varargin )
        %COSD Cosine of distributed array in degrees
        %   Y = COSD(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = cosd(D)
        %   
        %   See also COSD, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = cosh( varargin )
        %COSH Hyperbolic cosine of distributed array
        %   Y = COSH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = cosh(D)
        %   
        %   See also COSH, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = cospi( varargin )
        %COSPI  Compute cos(X*pi) accurately.
        %   Y = COSPI(X)
        %   
        %   See also COSPI, DISTRIBUTED.
        %   

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

        function [varargout] = cot( varargin )
        %COT Cotangent of distributed array in radians
        %   Y = COT(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = cot(D)
        %   
        %   See also COT, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = cotd( varargin )
        %COTD Cotangent of distributed array in degrees
        %   Y = COTD(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = cotd(D)
        %   
        %   See also COTD, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = coth( varargin )
        %COTH Hyperbolic cotangent of distributed array
        %   Y = COTH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.inf(N);
        %       E = coth(D)
        %   
        %   See also COTH, DISTRIBUTED, DISTRIBUTED/INF.

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

        function [varargout] = count( varargin )
        %COUNT Returns the number of occurrences of a pattern in a string
        %   
        %   C = COUNT(S,PATTERN)
        %   C = COUNT(S,PATTERN,'IgnoreCase',IGNORE)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also COUNT.
        %   

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

        function [varargout] = countcats( varargin )
        %COUNTCATS Count occurrences of categories in a distributed categorical array's elements.
        %   
        %   C = COUNTCATS(A)
        %   C = COUNTCATS(A,DIM) 
        %    
        %   See also CATEGORICAL/COUNTCATS, distributed.
        %   

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

        function [varargout] = cov( varargin )
        %COV Covariance matrix.
        %   C = COV(X) or COV(X,0)
        %   C = COV(X,1)
        %   C = COV(X,Y) 
        %   C = COV(X,Y,0)
        %   C = COV(X,Y,1)
        %   C = COV(..., MISSING)
        %   
        %   Example:
        %       Nrow = 50;
        %       Ncol = 100; 
        %       X = rand(Nrow, Ncol, 'distributed');
        %       xy = cov(X);     % Returns a 100 by 100 matrix
        %       Y = rand(Nrow, Ncol, 'distributed');
        %       xy = cov(X,Y);   % Returns a 2 by 2 matrix
        %   
        %   X and Y must be single or double matrices. Both real and
        %   complex types are supported.
        %   
        %   See also COV, DISTRIBUTED, DISTRIBUTED/CORRCOEF, DISTRIBUTED/VAR, STD, MEAN.

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

        function [varargout] = csc( varargin )
        %CSC Cosecant of distributed array in radians
        %   Y = CSC(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = csc(D)
        %   
        %   See also CSC, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = cscd( varargin )
        %CSCD Cosecant of distributed array in degrees
        %   Y = CSCD(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = cscd(D)
        %   
        %   See also CSCD, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = csch( varargin )
        %CSCH Hyperbolic cosecant of distributed array
        %   Y = CSCH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.inf(N);
        %       E = csch(D)
        %   
        %   See also CSCH, DISTRIBUTED, DISTRIBUTED/INF.

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

        function [varargout] = ctranspose( varargin )
        %' Complex conjugate transpose of distributed array
        %   E = D'
        %   E = CTRANSPOSE(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = complex(distributed.rand(N),distributed.rand(N))
        %       E = D'
        %   
        %   See also CTRANSPOSE, DISTRIBUTED, DISTRIBUTED/COMPLEX.

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

        function [varargout] = cummax( varargin )
        %CUMMAX Cumulative maximum of elements of distributed array
        %   CUMMAX(X)
        %   CUMMAX(X,DIM)
        %   CUMMAX(___,DIRECTION)
        %   CUMMAX(___,NANFLAG)
        %   
        %   Limitations:
        %   Table and timetable inputs are not supported.
        %   
        %   Example:
        %       N = 1000;
        %       D = cos(distributed.linspace(-pi, pi));
        %       c = cummax(D);
        %       c1 = cummax(D,1);
        %       c2 = cummax(D,2);
        %       isequal(c1, D)     % true
        %       isequal(c, c2)     % true
        %   
        %   See also CUMMAX, DISTRIBUTED, DISTRIBUTED/LINSPACE.

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

        function [varargout] = cummin( varargin )
        %CUMMIN Cumulative minimum of elements of distributed array
        %   CUMMIN(X)
        %   CUMMIN(X,DIM)
        %   CUMMIN(___,DIRECTION)
        %   CUMMIN(___,NANFLAG)
        %   
        %   Limitations:
        %   Table and timetable inputs are not supported.
        %   
        %   Example:
        %       N = 1000;
        %       D = cos(distributed.linspace(-pi, pi));
        %       c = cummin(D);
        %       c1 = cummin(D,1);
        %       c2 = cummin(D,2);
        %       isequal(c1, D)      % true
        %       isequal(c, c2)      % true
        %   
        %   See also CUMMIN, DISTRIBUTED, DISTRIBUTED/LINSPACE.

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

        function [varargout] = cumprod( varargin )
        %CUMPROD Cumulative product of elements of distributed array
        %   CUMPROD(X)
        %   CUMPROD(X,DIM)
        %   CUMPROD(___,DIRECTION)
        %   CUMPROD(___,NANFLAG)
        %   
        %   The order of the products within the CUMPROD operation is not defined, so
        %   the CUMPROD operation on a distributed array might not return exactly the same 
        %   answer as the CUMPROD operation on the corresponding MATLAB numeric array.
        %   In particular, the differences might be significant when X is a signed
        %   integer type.
        %   
        %   Limitations:
        %   Table and timetable inputs are not supported.
        %   
        %   Example:
        %       N = 1000;
        %       D = 4 * (distributed.colon(1, N) .^ 2);
        %       D2 = D ./ (D - 1);
        %       c = cumprod(D2);
        %       c1 = cumprod(D2,1);
        %       c2 = cumprod(D2,2);
        %       isequal(c1, D2) % true
        %       isequal(c, c2)  % true
        %       norm(c(end)-pi/2,'inf')
        %   
        %   c(end) is approximately pi/2 (by the Wallis product)
        %   
        %   See also CUMPROD, DISTRIBUTED, DISTRIBUTED/COLON.

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

        function [varargout] = cumsum( varargin )
        %CUMSUM Cumulative sum of elements of distributed array
        %   CUMSUM(X)
        %   CUMSUM(X,DIM)
        %   CUMSUM(___,DIRECTION)
        %   CUMSUM(___,NANFLAG)
        %   
        %   The order of the additions within the CUMSUM operation is not defined, so
        %   the CUMSUM operation on a distributed array might not return exactly the same 
        %   answer as the CUMSUM operation on the corresponding MATLAB numeric array.
        %   In particular, the differences might be significant when X is a signed
        %   integer type.
        %   
        %   Limitations:
        %   Table and timetable inputs are not supported.
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1, N);
        %       c = cumsum(D);
        %       c1 = cumsum(D,1);
        %       c2 = cumsum(D,2);
        %       isequal(c1, D)             % true
        %       isequal(c, c2)             % true
        %       isequal(c(end), (1+N)*N/2) % true 
        %   
        %   See also CUMSUM, DISTRIBUTED, DISTRIBUTED/COLON.

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

        function [varargout] = dateshift( varargin )
        %DATESHIFT Shift distributed datetimes or generate sequences according to a calendar rule.
        %   
        %   T2 = DATESHIFT(T,'start',UNIT)
        %   T2 = DATESHIFT(T,'end',UNIT)
        %   T2 = DATESHIFT(T,'dayofweek',DOW)
        %   T2 = DATESHIFT(T,'dayofweek','weekday')
        %   T2 = DATESHIFT(T,'dayofweek','weekend')
        %   T2 = DATESHIFT(T,...,RULE)
        %   
        %   See also DATETIME/DATESHIFT, DISTRIBUTED.
        %   

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

        function [varargout] = datetime( varargin )
        %DATETIME Create an array of distributed datetimes.
        %   
        %   D = DATETIME(DS,'InputFormat',INFMT)
        %   D = DATETIME(DS,'InputFormat',INFMT,'Locale',LOCALE)
        %   D = DATETIME(DS,'InputFormat',INFMT,'PivotYear',PIVOT,...)
        %   D = DATETIME(DV)
        %   D = DATETIME(Y,MO,D,H,MI,S)
        %   D = DATETIME(Y,MO,D)
        %   D = DATETIME(Y,MO,D,H,MI,S,MS)
        %   D = DATETIME(X,'ConvertFrom',TYPE)
        %   D = DATETIME(X,'ConvertFrom','epochtime','Epoch',EPOCH)
        %   D = DATETIME(...,'Format',FMT)
        %   D = DATETIME(...,'TimeZone',TZ,...)
        %    
        %   LIMITATION:
        %   When creating DATETIME from the strings in the cell array DS,
        %   always specify the input format INFMT, for correctness.
        %    
        %   See also DATETIME.
        %   

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

        function [varargout] = day( varargin )
        %DAY Day numbers or names of datetimes.
        %   
        %   D = DAY(T)
        %   D = DAY(T,KIND)
        %   
        %   See also DAY.
        %   

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

        function [varargout] = days( varargin )
        %DAYS Create durations from numeric values in units of standard-length days.
        %   
        %   D = DAYS(N)
        %    
        %   See also DAYS, distributed.
        %   

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

        function [varargout] = deblank( varargin )
        %DEBLANK Remove trailing blanks from distributed array of strings.
        %   R = DEBLANK(S)
        %   
        %   Note that S must be an array of strings or a cell array of char vectors.
        %   
        %   Example:
        %       a = { 'Hello  ',  'Goodbye ' };
        %       A = distributed(a)
        %       B = deblank(A)
        %   
        %   See also DEBLANK, DISTRIBUTED/STRTRIM, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = deconv( varargin )
        %DECONV Least-squares deconvolution and polynomial division of a distributed vector.
        %   
        %   [X,R] = DECONV(Y,H)
        %   [X,R] = DECONV(Y,H,SHAPE)
        %   [X,R] = DECONV(...,Method=ALG)
        %   [X,R] = DECONV(...,RegularizationFactor=alpha)
        %   
        %   Limitation:
        %   The "least-squares" method is not supported.
        %   
        %   See also DECONV, DISTRIBUTED, DISTRIBUTED/FILTER.

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

        function [varargout] = deg2rad( varargin )
        %DEG2RAD Convert angles from degrees to radians.
        %   R = DEG2RAD(D)
        %   
        %   Example:
        %       n = 1000;
        %       d = distributed.linspace(0,180,n);
        %       r = deg2rad(d)
        %   
        %   See also DEG2RAD, DISTRIBUTED, DISTRIBUTED/LINSPACE.

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

        function [varargout] = del2( varargin )
        %DEL2 Discrete Laplacian.
        %   L = DEL2(U)
        %   L = DEL2(U,H)
        %   L = DEL2(U,HX,HY)
        %   L = DEL2(U,HX,HY,HZ,...)
        %   
        %   Example:
        %       IM = distributed(imread('street2.jpg')); % Load image
        %       IM = mean(IM,3);     % Convert to grayscale
        %       L = del2(IM);        % Find interest points
        %       imagesc(L > 8);      % Show as image
        %   
        %   See also DEL2, DISTRIBUTED, DISTRIBUTED/GRADIENT, DISTRIBUTED/DIFF.
        %   

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

        function [varargout] = diag( varargin )
        %DIAG Diagonal matrices and diagonals of a distributed matrix
        %   
        %   A = DIAG(D,K) when D is a distributed vector with N components results 
        %   in a square distributed matrix A of order N+ABS(K) with the elements of 
        %   D along the K-th diagonal of A.  Recall that K = 0 is the main diagonal, 
        %   K > 0 is above the main diagonal, and K < 0 is below the main diagonal.
        %   
        %   A = DIAG(D) is the same as A = DIAG(D,0) and puts D along the main 
        %   diagonal of A.
        %   
        %   D = DIAG(A,K) when A is a distributed matrix results in a distributed 
        %   column vector D formed from the elements of the K-th diagonal of A.  
        %   
        %   D = DIAG(A) is the same as D = DIAG(A,0) and D is the main diagonal 
        %   of A. Note that DIAG(DIAG(A)) results in a distributed diagonal matrix.
        %   
        %   Example:
        %       N = 1000;
        %       d = distributed.colon(N,-1,1)'
        %       d2 = distributed.colon(1,ceil(N/2))'
        %       D = diag(d) + diag(d2,floor(N/2))
        %   
        %   creates two distributed column vectors d and d2 and then populates the
        %   distributed matrix D with them as diagonals.
        %   
        %   See also DIAG, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.
        %   

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

        function [varargout] = diff( varargin )
        %DIFF Difference and approximate derivative.
        %   Y = DIFF(X)
        %   Y = DIFF(X,N)
        %   Y = DIFF(X,N,DIM)
        %   
        %   Example:
        %       N = 10;
        %       X = distributed.colon(1,N).^2;
        %       Y = diff(X)
        %   
        %   returns distributed.colon(3,2,19).
        %   
        %   See also DIFF, DISTRIBUTED, DISTRIBUTED/SUM,DISTRIBUTED/PROD 

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

        function [varargout] = dot( varargin )
        %DOT Vector dot product of distributed array
        %   C = DOT(A,B)
        %   C = DOT(A,B,DIM)
        %   
        %   Example:
        %       N = 1000;
        %       d1 = distributed.colon(1,N);
        %       d2 = distributed.ones(N,1);
        %       d = dot(d1,d2)
        %   
        %   returns d = N*(N+1)/2.
        %   
        %   See also DOT, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ONES.

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

        function [varargout] = double( varargin )
        %DOUBLE Convert distributed array to double precision
        %   Y = DOUBLE(X)
        %   
        %   Example:
        %       N = 1000;
        %       Ds = distributed.ones(N,'single');
        %       Dd = double(Ds);
        %       classDs = underlyingType(Ds)
        %       classDd = underlyingType(Dd)
        %   
        %   takes the N-by-N distributed single matrix Ds and converts
        %   it to the distributed double matrix Dd.
        %   classDs is 'single' while classDd is 'double'.
        %   
        %   See also DOUBLE, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = duration( varargin )
        %DURATION Create an array of distributed durations.
        %   
        %   D = DURATION(DV)
        %   D = DURATION(H,MI,S)
        %   D = DURATION(H,MI,S,MS)
        %   D = DURATION(...,'Format',FMT)
        %   D = DURATION(T)
        %   D = DURATION(T,'InputFormat',FMT)
        %    
        %   See also DURATION, distributed.
        %   

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

        function [varargout] = eig( varargin )
        %EIG Eigenvalues and eigenvectors of distributed array
        %   D = EIG(A)
        %   [V,D] = EIG(A)
        %   [V,D,W] = EIG(A)
        %   [...] = EIG(A,'balance')
        %   [...] = EIG(A,'nobalance')
        %   D = EIG(A,B)
        %   [V,D] = EIG(A,B)
        %   [...] = EIG(A,B,'chol')
        %   [...] = EIG(...,'vector')
        %   [...] = EIG(...,'matrix')
        %   
        %   Limitations:
        %   
        %   If you specify A and B, both must be Hermitian matrices and
        %   B must be positive definite.
        %   
        %   See also EIG, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = eigs( varargin )
        %EIGS Find a few eigenvalues and eigenvectors of a distributed matrix
        %   D = EIGS(A)
        %   [V,D] = EIGS(A)
        %   [V,D,FLAG] = EIGS(A)
        %   
        %   EIGS(A,B)
        %   EIGS(A,K) and EIGS(A,B,K)
        %   EIGS(A,K,SIGMA) and EIGS(A,B,K,SIGMA)
        %   EIGS(A,K,SIGMA,NAME,VALUE) and EIGS(A,B,K,SIGMA,NAME,VALUE)
        %   EIGS(A,K,SIGMA,OPTIONS) and EIGS(A,B,K,SIGMA,OPTIONS)
        %   
        %   The following syntaxes are not supported for distributed array:
        %   
        %   For SIGMA being 'largestabs', 'largestreal', 'smallestreal', 'bothendsreal', 
        %   'largestimag', 'smallestimag', or 'bothendsimag':
        %       EIGS(A,B,K,SIGMA) if B is sparse and neither diagonal nor triangular
        %   
        %   For SIGMA being 'smallestabs' or numeric:
        %       EIGS(A,K,SIGMA) if A is sparse and neither diagonal nor triangular
        %       EIGS(A,B,K,SIGMA) if A-SIGMA*B is sparse and neither diagonal nor triangular
        %   
        %   Example:
        %       A = distributed(gallery('neumann',100));
        %       d = EIGS(A,10)
        %   
        %   A,B must be double matrices. Both real and complex types are supported.
        %   
        %   See also EIGS, DISTRIBUTED.

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

        function [varargout] = endsWith( varargin )
        %ENDSWITH True if string ends with pattern
        %   
        %   TF = ENDSWITH(S,PATTERN)
        %   TF = ENDSWITH(S,PATTERN,'IgnoreCase',IGNORE)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also ENDSWITH.
        %   

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

        function [varargout] = eps( varargin )
        %EPS Spacing of floating point numbers for distributed array
        %   E = EPS(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N,'single');
        %       E = eps(D)
        %   
        %   returns E = eps('single')*distributed.ones(N).
        %   
        %   See also EPS, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = eq( varargin )
        %== Equal for distributed array
        %   C = A == B
        %   C = EQ(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       T = D == D
        %       F = D == D'
        %   
        %   returns T = distributed.true(N) and F is probably the same as
        %   logical(distributed.eye(N)).
        %   
        %   See also EQ, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = erase( varargin )
        %ERASE Remove segments from string elements.
        %   
        %   S = ERASE(STR,START)
        %   S = ERASE(STR,START,END)
        %   S = ERASE(STR,START_STR,END_STR)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also ERASE.
        %   

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

        function [varargout] = eraseBetween( varargin )
        %ERASEBETWEEN Remove segments from string elements.
        %   STR = ERASEBETWEEN(STR, START, END)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also ERASEBETWEEN, distributed/STRING.
        %   

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

        function [varargout] = erf( varargin )
        %ERF Error function of distributed array
        %   Y = ERF(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = erf(D)
        %   
        %   See also ERFC, ERFCX, ERFINV, ERFCINV,  DISTRIBUTED, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = erfc( varargin )
        %ERFC Complementary error function of distributed array
        %   Y = ERFC(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = erfc(D)
        %   
        %   See also ERF, ERFCX, ERFINV, ERFCINV, DISTRIBUTED, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = erfcinv( varargin )
        %ERFCINV Inverse complementary error function of distributed array
        %   Y = ERFCINV(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = erfcinv(D)
        %   
        %   See also ERF, ERFC, ERFCX, ERFINV, DISTRIBUTED, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = erfcx( varargin )
        %ERFCX Scaled complementary error function of distributed array
        %   Y = ERFCX(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = erfcx(D)
        %   
        %   See also ERF, ERFINV, ERFC, ERFCINV, DISTRIBUTED, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = erfinv( varargin )
        %ERFINV Inverse error function of distributed array
        %   Y = ERFINV(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = erfinv(D)
        %   
        %   See also ERF, ERFC, ERFCX, ERFCINV,  DISTRIBUTED, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = exceltime( varargin )
        %EXCELTIME Convert datetimes to Excel serial date numbers.
        %   
        %   E = EXCELTIME(T)
        %   E = EXCELTIME(T,'1904')
        %   
        %   See also EXCELTIME.
        %   

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

        function [varargout] = exp( varargin )
        %EXP Exponential of distributed array
        %   Y = EXP(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = exp(D)
        %   
        %   See also EXP, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = expint( varargin )
        %EXPINT Exponential integral function.
        %       Y = expint(X) 
        %   
        %   Example:
        %       N = 1000;
        %       V = distributed.rand(N);
        %       F = expint(V);
        %   
        %   See also EXPINT, DISTRIBUTED, DISTRIBUTED/RAND.
        %   

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

        function [varargout] = expm1( varargin )
        %EXPM1 Compute EXP(X)-1 accurately for distributed array
        %   Y = EXPM1(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = eps(1) .* distributed.ones(N);
        %       E = expm1(D)
        %   
        %   See also EXPM1, DISTRIBUTED.

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

        function [varargout] = extractAfter( varargin )
        %EXTRACTAFTER Create a string from part of a larger string.
        %   S = EXTRACTAFTER(STR, START)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also EXTRACTAFTER, distributed/STRING.
        %   

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

        function [varargout] = extractBefore( varargin )
        %EXTRACTBEFORE Create a string from part of a larger string.
        %   S = EXTRACTBEFORE(STR, END)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also EXTRACTBEFORE, distributed/STRING.
        %   

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

        function [varargout] = extractBetween( varargin )
        %EXTRACTBETWEEN Create a string from part of a larger string.
        %   S = EXTRACTBETWEEN(STR, START, END)
        %   S = EXTRACTBETWEEN(..., 'Boundaries', B)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also EXTRACTBETWEEN, distributed/STRING.
        %   

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

        function [varargout] = factorial( varargin )
        %FACTORIAL Factorial function.
        %   F = FACTORIAL(N)
        %   
        %   64-bit integer input is not supported.
        %   
        %   Example:
        %       N = randi(100, 100000, 1, 'distributed'); % Random integers up to 100
        %       F = factorial(N);
        %   
        %   See also FACTORIAL, DISTRIBUTED, DISTRIBUTED/PROD.

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

        function [varargout] = fft( varargin )
        %FFT Discrete Fourier transform of distributed array
        %   Y = FFT(X) is the discrete Fourier transform (DFT) of vector X.  For 
        %   matrices, the FFT operation is applied to each column.  For N-D arrays,
        %   the FFT operation operates on the first non-singleton dimension.
        %   
        %   Y = FFT(X,M) is the M-point FFT, padded with zeros if X has less than
        %   M points and truncated if it has more.
        %   
        %   Y = FFT(X,[],DIM) or Y = FFT(X,M,DIM) applies the FFT operation across 
        %   the dimension DIM.
        %   
        %   Class support for input X: 
        %     float: double, single 
        %     integer: int8, uint8, int16, uint16, int32, uint32
        %     logical
        %   
        %   Example:
        %       Nrow = 2^16;
        %       Ncol = 100;
        %       X = distributed.rand(Nrow, Ncol);
        %       Y = fft(X);
        %   
        %   returns the FFT Y of the distributed matrix by applying the FFT to 
        %   each column.
        %   
        %   The current implementation gathers vectors on a single worker to perform
        %   prime length ffts rather than using a parallel FFT algorithm.  It 
        %   may result in out-of-memory errors for large prime length vector ffts.
        %   See also FFT, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = fft2( varargin )
        %FFT2 Two-dimensional discrete Fourier Transform for distributed array
        %   Y = FFT2(X) returns the two-dimensional Fourier transform of 
        %   distributed array X. If X is a vector, the result will have the 
        %   same orientation.
        %   
        %   Y = FFT2(X,MROWS,NCOLS) pads distributed array X with zeros to size MROWS-by-NCOLS
        %   before transforming.
        %   
        %   Class support for input X: 
        %     float: double, single 
        %     integer: int8, uint8, int16, uint16, int32, uint32
        %     logical
        %   
        %   Example:
        %       N = 512;
        %       X = distributed.rand(N);
        %       Y = fft2(X);
        %   
        %   See also FFT2, DISTRIBUTED.

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

        function [varargout] = fftn( varargin )
        %FFTN N-dimensional discrete Fourier Transform.
        %   Y = FFTN(X) returns the N-dimensional discrete Fourier transform
        %   of distributed array X.  If X is a vector, the output will have
        %   the same orientation.
        %   
        %   Y = FFTN(X, SIZ) pads or crops X to size SIZ before performing 
        %   the transform.
        %   
        %   Class support for input X: 
        %     float: double, single 
        %     integer: int8, uint8, int16, uint16, int32, uint32
        %     logical
        %   
        %   Example:
        %       N = 64;
        %       X = distributed.rand(N, N, N);
        %       Y = fftn(X);
        %   
        %   See also FFTN, DISTRIBUTED.

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

        function [varargout] = fftshift( varargin )
        %FFTSHIFT Shift zero-frequency component to center of spectrum.
        %   FFTSHIFT(X)
        %   FFTSHIFT(X,DIM)
        %   
        %   See also FFTSHIFT, DISTRIBUTED.

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

        function [varargout] = fieldnames( varargin )
        %FIELDNAMES Get structure field names of distributed array
        %   NAMES = FIELDNAMES(S)
        %   
        %   Example:
        %       matrices = { 1,  2,  3,  4,  5,  6,  7,  8,  9,  10};
        %       names    = {'a','b','c','d','e','f','g','h','i','j'};
        %       s = struct('matrix', matrices, 'name', names);
        %       S = distributed(s)
        %       f = fieldnames(S)
        %   
        %   returns the field names f = {'matrix','name'} of the 1-by-10
        %   distributed array of structs S.
        %   
        %   See also FIELDNAMES, DISTRIBUTED.

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

        function [varargout] = fillmissing( varargin )
        %FILLMISSING Fill missing entries in distributed data.
        %   B = FILLMISSING(A,'constant',C)
        %   B = FILLMISSING(A,INTERP)
        %   B = FILLMISSING(A,MOV,K)
        %   B = FILLMISSING(A,MOV,[NB NF])
        %   B = FILLMISSING(A,fillfun,K)
        %   B = FILLMISSING(A,fillfun,[NB NF])
        %   B = FILLMISSING(A,METHOD,...,'MissingLocations',M)
        %   B = FILLMISSING(A,METHOD,...,'EndValues',E)
        %   B = FILLMISSING(A,METHOD,...,'SamplePoints',X)
        %   B = FILLMISSING(A,...,'MaxGap',G)
        %   B = FILLMISSING(A,METHOD,DIM,...)
        %   [B,FB] = FILLMISSING(A,...)
        %   B = FILLMISSING(T,...,'DataVariables',DV)
        %   B = FILLMISSING(T,...,'ReplaceValues',TF)
        %   
        %   Limitations:
        %   Method 'knn' and 'Distance' argument are not supported.
        %   The 'MissingLocations' name-value argument with table or timetable value is not supported.
        %   
        %   See also FILLMISSING, DISTRIBUTED.

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

        function [varargout] = filter( varargin )
        %FILTER One-dimensional digital filter.
        %   Y = FILTER(B,A,X)
        %   Y = FILTER(B,A,X,ZI)
        %   Y = FILTER(B,A,X,ZI,DIM)
        %   [Y,ZF] = FILTER(___)
        %   
        %   Example:
        %       x = distributed.rand(8, 10);
        %       b = rand(5, 1);
        %       a = 3;
        %       dim = 2;
        %       [y,zf] = filter(b,a,x,[],dim)
        %   
        %   returns the filtering result and final filter conditions by applying 
        %   filter b to each row of data x.
        %    
        %   See also FILTER, DISTRIBUTED, DISTRIBUTED/FILTER2.

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

        function [varargout] = find( varargin )
        %FIND Find indices of nonzero elements of distributed array
        %   I = find(X)
        %   I = find(X,K)
        %   I = find(X,K,'first')
        %   I = find(X,K,'last')
        %   [I,J] = find(X,...)
        %   [I,J,V] = find(X,...)
        %   
        %   Example:
        %       N = 1000;
        %       X = distributed.rand(N) > 0.5 % build random array of ones and zeros
        %       I = find(X) % find the indices where elements of X are non-zero
        %   
        %   See also FIND, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = fix( varargin )
        %FIX Round distributed array towards zero
        %   Y = FIX(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1,N)./2
        %       E = fix(D)
        %   
        %   See also FIX, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = floor( varargin )
        %FLOOR Round distributed array towards minus infinity
        %   Y = FLOOR(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1,N)./2
        %       E = floor(D)
        %   
        %   See also FLOOR, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = fminsearch( varargin )
        %FMINSEARCH Find minimum of unconstrained multivariable function using derivative-free method

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

        function [varargout] = full( varargin )
        %FULL Convert sparse distributed matrix to full distributed matrix
        %   F = FULL(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.speye(N);
        %       F = full(D)
        %   
        %   returns F = distributed.eye(N).
        %   
        %   t = issparse(D)
        %   f = issparse(F)
        %   
        %   returns t = true and f = false.
        %   
        %   See also FULL, DISTRIBUTED, DISTRIBUTED/SPEYE.
        %   

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

        function [varargout] = gamma( varargin )
        %GAMMA Gamma function of distributed array
        %   Y = GAMMA(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = gamma(D)
        %   
        %   See also GAMMALN,  DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = gammainc( varargin )
        %GAMMAINC  Incomplete gamma function for distributed arrays
        %   Y = GAMMAINC(X,A)
        %   Y = GAMMAINC(X,A,TAIL)
        %   
        %   Example:
        %       N = 1000;
        %       X = 0.5;
        %       A = rand(N, 'distributed');
        %       gammainc(X,A)
        %   
        %   See also GAMMAINC, DISTRIBUTED/GAMMA, DISTRIBUTED/GAMMAINCINV, DISTRIBUTED.
        %   

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

        function [varargout] = gammaincinv( varargin )
        %GAMMAINCINV  Inverse incomplete gamma function for distributed arrays
        %   X = GAMMAINCINV(Y,A)
        %   X = GAMMAINCINV(Y,A,TAIL)
        %   
        %   Example:
        %       N = 1000;
        %       Y = 0.5;
        %       A = rand(N, 'distributed');
        %       gammaincinv(Y,A)
        %   
        %   See also GAMMAINCINV, DISTRIBUTED/GAMMA, DISTRIBUTED/GAMMAINC, DISTRIBUTED.
        %   

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

        function [varargout] = gammaln( varargin )
        %GAMMALN Logarithm of gamma function of distributed array
        %   Y = GAMMALN(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = gammaln(D)
        %   
        %   See also GAMMA,  DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = ge( varargin )
        %>= Greater than or equal for distributed array
        %   C = A >= B
        %   C = GE(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       T = D >= D
        %       F = D >= D+0.5
        %   
        %   returns T = distributed.true(N)
        %   and F = distributed.false(N).
        %   
        %   See also GE, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = gmres( varargin )
        %GMRES   Generalized Minimum Residual Method for distributed array.
        %   X = GMRES(A,B)
        %   X = GMRES(A,B,RESTART)
        %   X = GMRES(A,B,RESTART,TOL)
        %   X = GMRES(A,B,RESTART,TOL,MAXIT)
        %   X = GMRES(A,B,RESTART,TOL,MAXIT,M)
        %   X = GMRES(A,B,RESTART,TOL,MAXIT,M1,M2)
        %   X = GMRES(A,B,RESTART,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = GMRES(A,B,...)
        %   [X,FLAG,RELRES] = GMRES(A,B,...)
        %   [X,FLAG,RELRES,ITER] = GMRES(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = GMRES(A,B,...)
        %   
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using GMRES to solve a large system of distributed array data:
        %       n = 1e6; 
        %       dOnes = distributed.ones(n,1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -dOnes],-1:1,n,n);
        %       db = full(sum(dA,2)); 
        %       tol = 1e-8; 
        %       maxit = 15; 
        %       dM = spdiags(4*dOnes, 0, n, n);
        %   
        %       dX = gmres(dA,db,10,tol,maxit,dM)
        %   
        %   See also GMRES, DISTRIBUTED.

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

        function [varargout] = gt( varargin )
        %> Greater than for distributed array
        %   C = A > B
        %   C = GT(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       T = D > D-0.5
        %       F = D > D
        %   
        %   returns T = distributed.true(N) 
        %   and F = distributed.false(N).
        %   
        %   See also GT, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = hms( varargin )
        %HMS Hour, minute, and second numbers of datetimes.
        %   
        %   [H,M,S] = HMS(T)
        %   
        %   See also HMS.
        %   

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

        function [varargout] = horzcat( varargin )
        %HORZCAT Horizontal concatenation of distributed arrays
        %   C = HORZCAT(A,B,...) implements [A B ...] for distributed arrays.
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.eye(N);
        %       D2 = [D D] % a 1000-by-2000 distributed matrix
        %   
        %   See also HORZCAT, DISTRIBUTED, DISTRIBUTED/CAT.

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

        function [varargout] = hour( varargin )
        %HOUR Hour numbers of datetimes.
        %   
        %   H = HOUR(T)
        %   
        %   See also HOUR.
        %   

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

        function [varargout] = hours( varargin )
        %HOURS Create durations from numeric values in units of hours.
        %   
        %   H = HOURS(N)
        %    
        %   See also HOURS, distributed.
        %   

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

        function [varargout] = hypot( varargin )
        %HYPOT Robust computation of square root of sum of squares for distributed array
        %   C = HYPOT(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = 3e300*distributed.ones(N);
        %       D2 = 4e300*distributed.ones(N);
        %       E = hypot(D1,D2)
        %   
        %   See also HYPOT, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = ichol( varargin )
        %ICHOL  Sparse Incomplete Cholesky factorization of distributed array
        %   
        %   L = ichol(A)
        %   L = ichol(A,SETUP)
        %   
        %   Limitations:
        %   The "type" field of the structure "SETUP", if provided, must be "nofill".
        %   The input matrix must be real symmetric or complex hermitian.
        %   
        %   Example:
        %       A = distributed(gallery('poisson', 1600));
        %       setup.type = 'nofill';
        %       L = ichol(A, setup);
        %   
        %   See also ICHOL, DISTRIBUTED, DISTRIBUTED/ILU, GALLERY.
        %   

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

        function [varargout] = idivide( varargin )
        %IDIVIDE  Integer division with rounding option.
        %   C = IDIVIDE(A,B)
        %   C = IDIVIDE(A,B,OPT)
        %   
        %   Example:
        %       a = distributed(int32([-2 2]));
        %       b = distributed(int32(3));
        %       idivide(a,b) % returns [0 0]
        %       idivide(a,b,'floor') % returns [-1 0]
        %       idivide(a,b,'ceil') % returns [0 1]
        %       idivide(a,b,'round') % returns [-1 1]
        %   
        %   See also IDIVIDE, DISTRIBUTED, DISTRIBUTED/INT32.

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

        function [varargout] = ifft( varargin )
        %IFFT Inverse discrete Fourier transform of distributed array
        %   Y = IFFT(X) is the inverse discrete Fourier transform of 
        %   distributed array X.
        %   
        %   Y = IFFT(X,N) is the N-point inverse transform.
        %    
        %   Y = IFFT(X,[],DIM) or IFFT(X,N,DIM) is the inverse discrete Fourier
        %   transform of X across the dimension DIM.
        %    
        %   Y = IFFT(..., 'symmetric') causes IFFT to treat X as conjugate symmetric along
        %   the active dimension.  See the reference page for IFFT for the specific
        %   mathematical definition of this symmetry. If your input array is conjugate
        %   symmetric, then using the 'symmetric' parameter can speed up execution.
        %    
        %   Y = IFFT(..., 'nonsymmetric') causes IFFT to make no assumptions about the
        %   symmetry of X.
        %   
        %   Class support for input X: 
        %     float: double, single 
        %     integer: int8, uint8, int16, uint16, int32, uint32
        %     logical
        %   
        %   Example:
        %       Nrow = 2^16;
        %       Ncol = 100;
        %       X = distributed.rand(Nrow, Ncol);
        %       Y = ifft(X);
        %   
        %   See also IFFT, DISTRIBUTED.

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

        function [varargout] = ifft2( varargin )
        %IFFT2 Two-dimensional inverse discrete Fourier transform.
        %   Y = IFFT2(X) returns the two-dimensional inverse Fourier transform of 
        %   distributed array X. If X is a vector, the result will have the 
        %   same orientation.
        %   
        %   Y = IFFT2(X,MROWS,NCOLS) pads distributed array X with zeros to size MROWS-by-NCOLS
        %   before transforming.
        %    
        %   Y = IFFT2(..., 'symmetric') causes IFFT2 to treat X as conjugate symmetric in
        %   two dimensions so that the output is purely real.  See the reference page
        %   for IFFT2 for the specific mathematical definition of this symmetry. If 
        %   your input array is conjugate symmetric, then using the 'symmetric' 
        %   parameter can speed up execution.
        %    
        %   Y = IFFT2(..., 'nonsymmetric') causes IFFT2 to make no assumptions about the
        %   symmetry of X.
        %   
        %   Class support for input X: 
        %     float: double, single 
        %     integer: int8, uint8, int16, uint16, int32, uint32
        %     logical
        %   
        %   
        %   Example:
        %       N = 512;
        %       X = distributed.rand(N);
        %       Y = ifft2(X);
        %   
        %   See also IFFT2, DISTRIBUTED.

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

        function [varargout] = ifftn( varargin )
        %IFFTN N-dimensional inverse discrete Fourier Transform.
        %   Y = IFFTN(X) returns the N-dimensional inverse discrete Fourier transform
        %   of distributed array X.  If X is a vector, the output will have
        %   the same orientation.
        %   
        %   Y = IFFTN(X, SIZ) pads or crops X to size SIZ before performing 
        %   the transform.
        %   
        %   IFFTN(..., 'symmetric') causes IFFTN to treat X as multidimensionally
        %   conjugate symmetric so that the output is purely real. See the reference
        %   page for IFFTN for the specific mathematical definition of this symmetry.
        %   If your input array is conjugate symmetric, then using the 'symmetric' 
        %   parameter can speed up execution.
        %   
        %   IFFTN(..., 'nonsymmetric') causes IFFTN to make no assumptions about the
        %   symmetry of X.
        %   
        %   Class support for input X: 
        %     float: double, single 
        %     integer: int8, uint8, int16, uint16, int32, uint32
        %     logical
        %   
        %   Example:
        %       N = 64;
        %       X = distributed.rand(N, N, N);
        %       Y = ifftn(X);
        %   
        %   See also IFFTN, DISTRIBUTED.

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

        function [varargout] = ifftshift( varargin )
        %IFFTSHIFT Inverse FFT shift.
        %   IFFTSHIFT(X)
        %   IFFTSHIFT(X,DIM)
        %   
        %   See also IFFTSHIFT, DISTRIBUTED.

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

        function [varargout] = ilu( varargin )
        %ILU  Incomplete LU factorization of distributed array
        %   W = ILU(A)
        %   [L,U] = ILU(A)
        %   [L,U,P] = ILU(A)
        %   [...] = ILU(A,setup)
        %   
        %   Limitation:
        %   The "type" field of struct array "setup", if provided, must be "nofill". 
        %       
        %   Example:
        %       A = distributed(gallery('neumann', 1600)) + distributed.speye(1600);
        %       setup.type = 'nofill';
        %       W = ilu(A, setup);
        %   
        %   W is "L+U-speye(sizeA))" where L is unit lower triangular and U is
        %   upper triangular.
        %   
        %   See also ILU, DISTRIBUTED, GALLERY.
        %   

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

        function [varargout] = im2double( varargin )
        %IM2DOUBLE Convert distributed image to double precision.
        %   IM2DOUBLE takes a distributed image as input, and returns a distributed image
        %   of underlying class double.  If the input distributed image is of class
        %   double, the output distributed image is identical to it.  If the input
        %   distributed image is not double, IM2DOUBLE returns the equivalent distributed
        %   image of underlying class double, rescaling or offsetting the data as
        %   necessary.
        %   
        %   I2 = IM2DOUBLE(I1) converts the distributed intensity image I1 to double
        %   precision, rescaling the data if necessary.
        %   
        %   RGB2 = IM2DOUBLE(RGB1) converts the truecolor distributed image RGB1 to
        %   double precision, rescaling the data if necessary.
        %   
        %   I = IM2DOUBLE(BW) converts the binary distributed image BW to a double-
        %   precision intensity image.
        %   
        %   X2 = IM2DOUBLE(X1,'indexed') converts the indexed distributed image X1 to
        %   double precision, offsetting the data if necessary.
        %   
        %   Class Support
        %   -------------
        %   Intensity and truecolor distributed images can be uint8, uint16, double,
        %   logical, single, or int16. Indexed distributed images can be uint8,
        %   uint16, double or logical. Binary input distributed images must be
        %   logical. The output image is a distributed with underlying class of double.
        %   
        %   Example
        %   -------
        %       I1 = distributed(reshape(uint8(linspace(1,255,25)),[5 5]))
        %       I2 = im2double(I1)
        %   
        %   See also IM2DOUBLE, distributed.
        %   

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

        function [varargout] = imag( varargin )
        %IMAG Complex imaginary part of distributed array
        %   Y = IMAG(X)
        %   
        %   Example:
        %       N = 1000;
        %       rp = 3 * distributed.ones(N);
        %       ip = 4 * distributed.ones(N);
        %       D = complex(rp, ip);
        %       E = imag(D)
        %   
        %   See also IMAG, DISTRIBUTED, DISTRIBUTED/COMPLEX, DISTRIBUTED/ONES.

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

        function [varargout] = ind2rgb( varargin )
        %IND2RGB overloaded for distributed arrays
        %   IND2RGB Convert indexed image to RGB image.
        %   
        %   rgb = IND2RGB(X,MAP)
        %   
        %   See also ind2rgb, distributed
        %   

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

        function [varargout] = inpolygon( varargin )
        %INPOLYGON True for points inside or on a polygonal region.
        %   IN = INPOLYGON(X,Y,XV,YV)
        %   [IN ON] = INPOLYGON(X,Y,XV,YV)
        %   
        %   Example:
        %       xv = [0 3 3 0 0 NaN 1 1 2 2 1];
        %       yv = [0 0 3 3 0 NaN 1 2 2 1 1];
        %       x = rand(1000,1,'distributed')*3; 
        %       y = rand(1000,1,'distributed')*3;
        %       in = inpolygon(x,y,xv,yv);
        %       plot(xv,yv,x(in),y(in),'.r',x(~in),y(~in),'.b')
        %   
        %   See also INPOLYGON, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = insertAfter( varargin )
        %INSERTAFTER Insert text after a specified position.
        %   S = INSERTAFTER(STR, POS, TEXT)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also INSERTAFTER, distributed/STRING.
        %   

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

        function [varargout] = insertBefore( varargin )
        %INSERTBEFORE Insert text before a specified position.
        %   S = INSERTBEFORE(STR, POS, TEXT)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also INSERTBEFORE, distributed/STRING.
        %   

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

        function [varargout] = int16( varargin )
        %INT16 Convert distributed array to signed 16-bit integer
        %   I = INT16(X)
        %   
        %   Example:
        %       N = 1000;
        %       Du = distributed.ones(N,'uint16');
        %       Di = int16(Du)
        %       classDu = underlyingType(Du)
        %       classDi = underlyingType(Di)
        %   
        %   converts the N-by-N uint16 distributed array Du to the
        %   int16 distributed array Di.
        %   classDu is 'uint16' while classDi is 'int16'.
        %   
        %   See also INT16, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = int32( varargin )
        %INT32 Convert distributed array to signed 32-bit integer
        %   I = INT32(X)
        %   
        %   Example:
        %       N = 1000;
        %       Du = distributed.ones(N,'uint32');
        %       Di = int32(Du)
        %       classDu = underlyingType(Du)
        %       classDi = underlyingType(Di)
        %   
        %   converts the N-by-N uint32 distributed array Du to the
        %   int32 distributed array Di.
        %   classDu is 'uint32' while classDi is 'int32'.
        %   
        %   See also INT32, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = int64( varargin )
        %INT64 Convert distributed array to signed 64-bit integer
        %   I = INT64(X)
        %   
        %   Example:
        %       N = 1000;
        %       Du = distributed.ones(N,'uint64');
        %       Di = int64(Du)
        %       classDu = underlyingType(Du)
        %       classDi = underlyingType(Di)
        %   
        %   converts the N-by-N uint64 distributed array Du to the
        %   int64 distributed array Di.
        %   classDu is 'uint64' while classDi is 'int64'.
        %   
        %   See also INT64, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = int8( varargin )
        %INT8 Convert distributed array to signed 8-bit integer
        %   I = INT8(X)
        %   
        %   Example:
        %       N = 1000;
        %       Du = distributed.ones(N,'uint8');
        %       Di = int8(Du)
        %       classDu = underlyingType(Du)
        %       classDi = underlyingType(Di)
        %   
        %   converts the N-by-N uint8 distributed array Du to the
        %   int8 distributed array Di.
        %   classDu is 'uint8' while classDi is 'int8'.
        %   
        %   See also INT8, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = interp1( varargin )
        %INTERP1 1-D interpolation (table lookup) for distributed
        %   Vq = interp1(V,Xq)
        %   Vq = interp1(X,V,Xq)
        %   Vq = interp1(V,Xq,METHOD)
        %   Vq = interp1(X,V,Xq,METHOD)
        %   Vq = interp1(V,Xq,METHOD,'extrap')
        %   Vq = interp1(X,V,Xq,METHOD,'extrap')
        %   Vq = interp1(V,Xq,METHOD,EXTRAPVAL)
        %   Vq = interp1(X,V,Xq,METHOD,EXTRAPVAL)
        %   
        %   See also INTERP1, DISTRIBUTED.
        %   

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

        function [varargout] = interp2( varargin )
        %INTERP2 2-D interpolation (table lookup) for distributed
        %   Vq = interp2(V,Xq,Yq)
        %   Vq = interp2(X,Y,V,Xq,Yq)
        %   Vq = interp2(V,Xq,Yq,METHOD)
        %   Vq = interp2(X,Y,V,Xq,Yq,METHOD)
        %   Vq = interp2(V,Xq,Yq,METHOD,EXTRAPVAL)
        %   Vq = interp2(X,Y,V,Xq,Yq,METHOD,EXTRAPVAL)
        %   Vq = interp2(V,NTIMES)
        %   Vq = interp2(V) % same as interp2(V, 1)
        %   
        %   The value argument V must be a double or single 2-D array, real or complex. V cannot be a vector.
        %   
        %   The grid arguments X and Y must have the following characteristics:
        %     * same type, double or single.
        %     * finite vectors or 2-D arrays with increasing and non-repeating elements in corresponding dimension. 
        %     * When X and Y are non-vector 2-D arrays, they must align with cartesian axes, as if they were 
        %       produced by meshgrid.
        %     * dimensions consistent with those of value V. 
        %   
        %   The query arguments Xq and Yq must be vectors or arrays of the same type (double or single). 
        %   If Xq and Yq are arrays, they must be the same size. If they are vectors with different lengths, 
        %   they must have different orientations.
        %   
        %   NTIMES currently only supports non-negative real scalars.
        %   
        %   The extrapolation for the out-of-boundary input is not supported.
        %   
        %   Example:
        %       [X,Y,V] = peaks(10);
        %       xq = distributed.colon(-3, 0.01, 3);
        %       yq = distributed.colon(-3, 0.01, 3);
        %       Vq = interp2(X, Y, V, xq', yq);
        %       [Xq,Yq] = meshgrid(xq, yq);  
        %       mesh(Xq,Yq,Vq);
        %   
        %   creates an array Vq from bilinearly interpolating function values in V. 
        %   The size of Vq equals to that of Xq or Yq. Or the number of rows in Vq equals to the length of yq. 
        %   The number of columns in Vq equals to the length of xq.  
        %   
        %   See also INTERP2, INTERP3, INTERPN, MESHGRID, SCATTEREDINTERPOLANT, DISTRIBUTED.

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

        function [varargout] = interp3( varargin )
        %INTERP3 3-D interpolation (table lookup) for distributed
        %   Vq = interp3(V,Xq,Yq,Zq)
        %   Vq = interp3(X,Y,Z,V,Xq,Yq,Zq)
        %   Vq = interp3(V,Xq,Yq,Zq,METHOD)
        %   Vq = interp3(X,Y,Z,V,Xq,Yq,Zq,METHOD)
        %   Vq = interp3(V,Xq,Yq,Zq,METHOD,EXTRAPVAL)
        %   Vq = interp3(X,Y,Z,V,Xq,Yq,Zq,METHOD,EXTRAPVAL)
        %   Vq = interp3(V,NTIMES)
        %   Vq = interp3(V) % same as interp3(V, 1)
        %   
        %   The value argument V must be a double or single 3-D array, real or complex. 
        %   
        %   The grid arguments X, Y and Z must have the following characteristics:
        %     * Same type, double or single.
        %     * Finite vectors or 3-D arrays with increasing and non-repeating elements in corresponding dimension. 
        %     * When X, Y, and Z are 3-D arrays, they must align with cartesian axes, as if they were 
        %       produced by meshgrid.
        %     * Dimensions consistent with those of value V. 
        %   
        %   The query arguments Xq, Yq and Zq must be vectors or arrays of the same type (double or single). 
        %   If Xq, Yq and Zq are arrays, they must be the same size. If they are vectors with different lengths, 
        %   one of them must have different orientation.
        %   
        %   Example:
        %       [X,Y,Z,V] = flow(10);
        %       xq = distributed.colon(0.1, 0.1, 10);
        %       yq = distributed.colon(-3, 0.1, 3);
        %       zq = distributed.colon(-3, 0.1, 3);
        %       Vq = interp3(X, Y, Z, V, xq', yq, zq); % Vq is 61-by-100-by-61
        %       [Xq,Yq,Zq] = meshgrid(xq, yq, zq);  
        %       slice(Xq,Yq,Zq,Vq,[6 9.5],2,[-2 .2]); % shading flat
        %   
        %   creates an array Vq from linearly interpolating function values in V. 
        %   The size of Vq equals that of Xq or Yq or Zq. The number of rows in Vq equals the length of yq. 
        %   The number of columns in Vq equals the length of xq. The number of elements in the third dimension
        %   equals the length of zq.  
        %   
        %   See also INTERP1, INTERP2, INTERPN, MESHGRID, SCATTEREDINTERPOLANT, DISTRIBUTED.

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

        function [varargout] = interpn( varargin )
        %INTERPN N-D interpolation (table lookup) for distributed
        %   Vq = interpn(V,X1q,X2q,X3q,...)
        %   Vq = interpn(X1,X2,X3,...,V,X1q,X2q,X3q,...)
        %   Vq = interpn(V,X1q,X2q,X3q,...,METHOD)
        %   Vq = interpn(X1,X2,X3,...,V,X1q,X2q,X3q,...,METHOD)
        %   Vq = interpn(V,X1q,X2q,X3q,...,METHOD,EXTRAPVAL)
        %   Vq = interpn(X1,X2,X3,...,V,X1q,X2q,X3q,...,,METHOD,EXTRAPVAL)
        %   Vq = interpn(V,NTIMES)
        %   Vq = interpn(V) % same as interpn(V, 1)
        %   
        %   The value argument V must be a double or single N-D array, real or complex. 
        %   
        %   The grid arguments X1, X2, X3, ... must have the following characteristics:
        %     * Same type, double or single.
        %     * Finite vectors or N-D arrays with increasing and non-repeating elements in corresponding dimension. 
        %     * When X1, X2, X3, ... are N-D arrays, they must align with cartesian axes, as if they were 
        %       produced by ndgrid.
        %     * Dimensions consistent with those of value V. 
        %   
        %   The query arguments X1q, X2q, X3q, ... must be vectors or arrays of the same type (double or single). 
        %   If X1q, X2q, X3q, ... are arrays, they must be the same size. If they are vectors with different lengths, 
        %   one of them must have different orientation.
        %   
        %   Example:
        %      f = @(x,y,z,t) t.*exp(-x.^2 - y.^2 - z.^2);
        %      [x,y,z,t] = ndgrid(-1:0.2:1,-1:0.2:1,-1:0.2:1,0:2:10);
        %      v = f(x,y,z,t);
        %      [xq,yq,zq,tq] = ndgrid(-1:0.05:1,-1:0.08:1,-1:0.05:1,0:0.5:10);
        %      vq = interpn(x,y,z,t,distributed(v),xq,yq,zq,tq);        
        %   
        %      % Visualize the function:
        %      nframes = size(tq, 4);
        %      for j = 1:nframes
        %         slice(yq(:,:,:,j), xq(:,:,:,j), zq(:,:,:,j), vq(:,:,:,j),0,0,0);
        %         caxis([0 10]);
        %         M(j) = getframe;
        %      end
        %      movie(M); 
        %   
        %   See also INTERP1, INTERP2, INTERP3, NDGRID, SCATTEREDINTERPOLANT, DISTRIBUTED.

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

        function [varargout] = intersect( varargin )
        %INTERSECT Set intersect for distributed array data.
        %   C = intersect(A,B)    
        %   [C,IA,IB] = intersect(A,B)    
        %   [C,IA,IB] = intersect(A,B,'rows')    
        %   [C,IA,IB] = intersect(A,B,'stable') 
        %   [C,IA,IB] = intersect(A,B,'stable','rows') 
        %   [C,IA,IB] = intersect(A,B,'sorted') 
        %   [C,IA,IB] = intersect(A,B,'sorted','rows') 
        %   
        %   Limitations:
        %   The 'legacy' flag is not supported.
        %   1. Table, timetable, categorical, datetime and duration inputs are not supported.
        %   2. Char and string inputs are not supported when A or B is a cell array of char vectors. Convert cell array of char vectors input arguments to string instead.
        %   
        %   See also intersect, distributed.

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

        function [varargout] = inv( varargin )
        %INV    Matrix inverse for distributed arrays
        %   X = INV(C) is the inverse of distributed matrix C.
        %   
        %   
        %   See also INV, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = ipermute( varargin )
        %IPERMUTE Inverse permute distributed array dimensions
        %   A = IPERMUTE(B, ORDER)
        %   
        %   Example:
        %       A = distributed.rand(1,2,3,4);
        %       B = permute(A, [3 2 1 4]); 
        %       C = ipermute(B, [3 2 1 4]);
        %       isequal(A, C) % A and C are equal
        %   
        %   See also IPERMUTE, PERMUTE, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = isbanded( varargin )
        %ISBANDED  Determine if  distributed matrix is within specific bandwidth.
        %   
        %   TF = ISBANDED(A,LOWER,UPPER) returns logical 1 (true) if matrix A is 
        %   within the specified lower bandwidth, LOWER, and upper bandwidth, UPPER; 
        %   otherwise, it returns logical 0 (false).
        %   
        %   Example:
        %      A = distributed([2 3 0 0 ; 1 -2 -3 0; 0 -1 2 3 ; 0 0 -1 2]);
        %      isbanded(A,1,1) % = 1
        %      isbanded(A,0,1) % = 0
        %   
        %   See also ISBANDED, DISTRIBUTED, DISTRIBUTED/BANDWIDTH.
        %   

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

        function [varargout] = isbetween( varargin )
        %ISBETWEEN Determine if distributed datetime or duration arrays are contained in an interval.
        %   
        %   TF = ISBETWEEN(A,LOWER,UPPER)
        %   TF = ISBETWEEN(A,LOWER,UPPER,INTERVALTYPE)
        %   
        %   See also DATETIME/ISBETWEEN, DURATION/ISBETWEEN, DISTRIBUTED.
        %   

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

        function [varargout] = iscategory( varargin )
        %ISCATEGORY Test for categorical array categories.
        %   
        %   TF = ISCATEGORY(A,CATEGORIES)
        %    
        %   See also CATEGORICAL/ISCATEGORY, distributed.
        %   

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

        function [varargout] = iscellstr( varargin )
        %ISCELLSTR True for distributed cell array of strings
        %     TF = ISCELLSTR(X)
        %     
        %     Example:
        %         N = 1000;
        %         A = cellstr(repmat('a', N, 1));
        %         D = distributed(A);
        %         tf = iscellstr(D);
        %     
        %     returns tf = true.
        %     
        %     See also ISCELLSTR, CELLSTR, REPMAT, DISTRIBUTED.

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

        function [varargout] = isdiag( varargin )
        %ISDIAG  Determine whether a distributed matrix is diagonal.
        %   ISDIAG(X)
        %   
        %   Example:
        %      X = distributed.eye(1000);
        %      isdiag(X)
        %   
        %   See also ISDIAG, DISTRIBUTED, DISTRIBUTED.EYE.
        %   

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

        function [varargout] = isdst( varargin )
        %ISDST True for datetimes occurring during Daylight Saving Time.
        %   
        %   TF = ISDST(T)
        %   
        %   See also ISDST.
        %   

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

        function [varargout] = isequal( varargin )
        %ISEQUAL True if distributed arrays are numerically equal
        %   TF = ISEQUAL(A,B)
        %   TF = ISEQUAL(A,B,C,...)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.nan(N);
        %       f = isequal(D,D)
        %       t = isequaln(D,D)
        %   
        %   returns f = false and t = true.
        %   
        %   See also ISEQUAL, DISTRIBUTED, DISTRIBUTED/NAN.

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

        function [varargout] = isequaln( varargin )
        %ISEQUALN True if distributed arrays are numerically equal
        %   TF = ISEQUALN(A,B)
        %   TF = ISEQUALN(A,B,C,...)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.nan(N);
        %       f = isequal(D,D)
        %       t = isequaln(D,D)
        %   
        %   returns f = false and t = true.
        %   
        %   See also ISEQUALN, DISTRIBUTED, DISTRIBUTED/NAN.
        %   

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

        function [varargout] = isfinite( varargin )
        %ISFINITE True for finite elements of distributed array
        %   TF = ISFINITE(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       T = isfinite(D)
        %   
        %   returns T = distributed.true(size(D)).
        %   
        %   See also ISFINITE, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = ishermitian( varargin )
        %ISHERMITIAN  Determine whether a distributed matrix is real symmetric or complex Hermitian.
        %   ISHERMITIAN(X)
        %   ISHERMITIAN(X,'skew')
        %   ISHERMITIAN(X,'nonskew')
        %   
        %   Example:
        %      T = distributed(triu(gallery('moler',1000)));
        %      X = T*(1+1i) - T'*(1-1i);
        %      ISHERMITIAN(X)
        %      ISHERMITIAN(X, 'skew')
        %   
        %   See also ISHERMITIAN, MAGIC, DISTRIBUTED.
        %   

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

        function [varargout] = isinf( varargin )
        %ISINF True for infinite elements of distributed array
        %   TF = ISINF(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.inf(N);
        %       T = isinf(D)
        %   
        %   returns T = distributed.true(size(D)).
        %   
        %   See also ISINF, DISTRIBUTED, DISTRIBUTED/INF.

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

        function [varargout] = ismember( varargin )
        %ISMEMBER True for member of distributed set
        %   LIA = ISMEMBER(A,B)
        %   LIA = ISMEMBER(A,B,'rows')
        %   [LIA,LOCB] = ISMEMBER(A,B)
        %   [LIA,LOCB] = ISMEMBER(A,B,'rows')
        %   
        %   Limitation:
        %   The 'legacy' option is not supported.
        %   Table and timetable inputs are not supported.
        %   
        %   See also ISMEMBER, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = ismissing( varargin )
        %ISMISSING Find missing entries
        %   TF = ISMISSING(T)
        %   TF = ISMISSING(T,INDICATORS)
        %   TF = ISMISSING(...,'OutputFormat',FORMAT)
        %   
        %   See also ISMISSING, DISTRIBUTED.
        %   

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

        function [varargout] = isnan( varargin )
        %ISNAN True for Not-a-Number elements of distributed array
        %   TF = ISNAN(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.nan(N);
        %       T = isnan(D)
        %   
        %   returns T = distributed.true(size(D)).
        %   
        %   See also ISNAN, DISTRIBUTED, DISTRIBUTED/NAN.

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

        function [varargout] = isnat( varargin )
        %ISNAT True for datetimes that are Not-a-Time.
        %   
        %   TF = ISNAT(T)
        %   
        %   See also ISNAT.
        %   

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

        function [varargout] = isordinal( varargin )
        %ISORDINAL True if the categories in a categorical array have a mathematical ordering.
        %   
        %   TF = ISORDINAL(C)
        %    
        %   See also ISORDINAL, distributed.
        %   

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

        function [varargout] = isprotected( varargin )
        %ISPROTECTED True if the categories in a categorical array are protected.
        %   
        %   TF = ISPROTECTED(C)
        %    
        %   See also ISPROTECTED, distributed.
        %   

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

        function [varargout] = issorted( varargin )
        %ISSORTED Check if distributed data is sorted.
        %   TF = ISSORTED(A)
        %   TF = ISSORTED(A,DIM)
        %   TF = ISSORTED(A,...,DIRECTION)
        %   TF = ISSORTED(A,...,'MissingPlacement',M)
        %   TF = ISSORTED(A,...,'ComparisonMethod',C)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.randn(N, 1);
        %       issorted(D)
        %       D = sort(D, 1);
        %       issorted(D)
        %   
        %   See also ISSORTED, ISSORTEDROWS, SORT, DISTRIBUTED.
        %   

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

        function [varargout] = issortedrows( varargin )
        %ISSORTEDROWS Check if distributed matrix rows are sorted
        %   TF = ISSORTEDROWS(A)
        %   TF = ISSORTEDROWS(A,COL)
        %   TF = ISSORTEDROWS(A,...,DIRECTION)
        %   TF = ISSORTEDROWS(A,...,'MissingPlacement',M)
        %   TF = ISSORTEDROWS(A,...,'ComparisonMethod',C)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.randn(N, N);
        %       issortedrows(D)
        %       D = sortrows(D);
        %       issortedrows(D)
        %   
        %   See also ISSORTED, SORTROWS, DISTRIBUTED.
        %   

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

        function [varargout] = issymmetric( varargin )
        %ISSYMMETRIC  Determine whether a distributed matrix is real or complex symmetric.
        %   ISSYMMETRIC(X)
        %   ISSYMMETRIC(X,'skew')
        %   ISSYMMETRIC(X,'nonskew')
        %   
        %   Example:
        %      X = distributed(gallery('moler',1000));
        %      issymmetric(X)
        %   
        %   See also ISSYMMETRIC, MAGIC, DISTRIBUTED.
        %   

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

        function [varargout] = istril( varargin )
        %ISTRIL  Determine whether a distributed matrix is lower triangular.
        %   ISTRIL(X)
        %   
        %   Example:
        %      X = distributed(tril(magic(1000)));
        %      istril(X)
        %   
        %   See also ISTRIL, TRIL, MAGIC, DISTRIBUTED.
        %   

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

        function [varargout] = istriu( varargin )
        %ISTRIU  Determine whether a distributed matrix is upper triangular.
        %   ISTRIU(X)
        %   
        %   Example:
        %      X = distributed(triu(magic(1000)));
        %      istriu(X)
        %   
        %   See also ISTRIU, TRIU, MAGIC, DISTRIBUTED.
        %   

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

        function [varargout] = isundefined( varargin )
        %ISUNDEFINED True for elements of a categorical array that are undefined.
        %   
        %   TF = ISUNDEFINED(A)
        %    
        %   See also CATEGORICAL/ISUNDEFINED, distributed.
        %   

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

        function [varargout] = isuniform( varargin )
        %ISUNIFORM Check if distributed array data is uniformly spaced.
        %   TF = ISUNIFORM(A)
        %   [TF,STEP] = ISUNIFORM(A)
        %   
        %   See also ISUNIFORM, DISTRIBUTED.

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

        function [varargout] = isweekend( varargin )
        %ISWEEKEND True for datetimes occurring on a weekend.
        %   
        %   TF = ISWEEKEND(T)
        %   
        %   See also ISWEEKEND.
        %   

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

        function [varargout] = join( varargin )
        %JOIN Combine elements of a string array together
        %   
        %   S = JOIN(STR)
        %   S = JOIN(STR,DELIMITER)
        %   S = JOIN(STR,DIM)
        %   S = JOIN(STR,DELIMITER,DIM)
        %   
        %   See also JOIN.
        %   

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

        function [varargout] = juliandate( varargin )
        %JULIANDATE Convert datetimes to Julian dates.
        %   
        %   J = JULIANDATE(T)
        %   J = JULIANDATE(T,'modifiedjuliandate')
        %   
        %   See also JULIANDATE.
        %   

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

        function [varargout] = kron( varargin )
        %KRON Kronecker tensor product.
        %   K = KRON(A, B)
        %   
        %   See also KRON.
        %   

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

        function [varargout] = ldivide( varargin )
        %.\ Left array divide for distributed array matrix
        %   C = A .\ B
        %   C = LDIVIDE(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.colon(1, N)'
        %       D2 = D1 .\ 1 
        %   
        %   See also LDIVIDE, DISTRIBUTED, DISTRIBUTED/COLON.

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

        function [varargout] = le( varargin )
        %<= Less than or equal for distributed array
        %   C = A <= B
        %   C = LE(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       T = D <= D
        %       F = D <= D-0.5
        %   
        %   returns T = distributed.true(N)
        %   and F = distributed.false(N).
        %   
        %   See also LE, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = linsolve( varargin )
        %LINSOLVE Solve linear system A*X=B for distributed arrays
        %   
        %   X = linsolve(A,B)
        %   X = linsolve(A,B,OPTS)
        %   [X,R] = linsolve(...)
        %   
        %   See also DISTRIBUTED, MLDIVIDE, DECOMPOSITION.

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

        function [varargout] = log( varargin )
        %LOG Natural logarithm of distributed array
        %   Y = LOG(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N);
        %       E = log(D)
        %   
        %   See also LOG, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = log10( varargin )
        %LOG10 Common (base 10) logarithm of distributed array
        %   Y = LOG10(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = 10.^distributed.colon(1,N);
        %       E = log10(D)
        %   
        %   See also LOG10, DISTRIBUTED, DISTRIBUTED/COLON.

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

        function [varargout] = log1p( varargin )
        %LOG1P Compute log(1+z) accurately of distributed array
        %   Y = LOG1P(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = eps(1) .* distributed.ones(N);
        %       E = log1p(D)
        %   
        %   See also LOG1P, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = log2( varargin )
        %LOG2 Base 2 logarithm and dissect floating point number of distributed array
        %   Y = LOG2(X)
        %   [F,E] = LOG2(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = 2.^distributed.colon(1, N);
        %       E = log2(D)
        %   
        %   See also LOG2, DISTRIBUTED, DISTRIBUTED/COLON.

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

        function [varargout] = logical( varargin )
        %LOGICAL Convert numeric values of distributed array to logical
        %   L = LOGICAL(X)
        %   
        %   Example:
        %       N = 1000;
        %       Du = distributed.ones(N,'uint8');
        %       Dl = logical(Du)
        %       classDu = underlyingType(Du)
        %       classDl = underlyingType(Dl)
        %   
        %   converts the N-by-N uint8 distributed array Du to the
        %   logical distributed array Dl.
        %   classDu is 'uint8' while classDl is 'logical'.
        %   
        %   See also LOGICAL, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = lower( varargin )
        %LOWER Convert distributed array of strings to lowercase.
        %   B = LOWER(A)
        %   
        %   Note that A must be an array of strings or a cell array of char vectors.
        %   
        %   Example:
        %       a = { 'Hello',  'goodBYE' };
        %       A = distributed(a)
        %       B = lower(A)
        %   
        %   See also LOWER, DISTRIBUTED/UPPER, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = lscov( varargin )
        %LSCOV Least squares with known covariance for distributed array data.
        %   X = LSCOV(A,B)
        %   X = LSCOV(A,B,W)
        %   X = LSCOV(A,B,V)
        %   X = LSCOV(A,B,V,ALG)
        %   [X,STDX] = LSCOV(...)
        %   [X,STDX,MSE] = LSCOV(...)
        %   [X,STDX,MSE,S] = LSCOV(...)
        %   
        %   Limitations:
        %   Sparse distributed array inputs are not supported.
        %   
        %   See also LSCOV, distributed.
        %   

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

        function [varargout] = lsqr( varargin )
        %LSQR   lsqr Method for distributed array.
        %   X = LSQR(A,B)
        %   X = LSQR(A,B)
        %   X = LSQR(A,B,TOL)
        %   X = LSQR(A,B,TOL,MAXIT)
        %   X = LSQR(A,B,TOL,MAXIT,M)
        %   X = LSQR(A,B,TOL,MAXIT,M1,M2)
        %   X = LSQR(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = LSQR(A,B,...)
        %   [X,FLAG,RELRES] = LSQR(A,B,...)
        %   [X,FLAG,RELRES,ITER] = LSQR(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = LSQR(A,B,...)
        %      
        %   Note that B must be a non-sparse column vector.
        %   
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using LSQR to solve a large system of distributed array data:
        %       n = 1e6; 
        %       dOnes = distributed.ones(n,1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -dOnes],-1:1,n,n);
        %       db = full(sum(dA,2)); 
        %       tol = 1e-8; 
        %       maxit = 50; 
        %       
        %       dX = LSQR(dA,db,tol,maxit)
        %   
        %   See also LSQR, DISTRIBUTED.

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

        function [varargout] = lt( varargin )
        %< Less than for distributed array
        %   C = A < B
        %   C = LT(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       T = D < D+0.5
        %       F = D < D
        %   
        %   returns T = distributed.true(N)
        %   and F = distributed.false(N).
        %   
        %   See also LT, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = lu( varargin )
        %LU factorization for distributed array
        %   [L,U] = LU(D)
        %   [L,U,P] = LU(D)
        %   [L,U,P] = LU(A, outputForm)
        %    
        %   D must be a full distributed matrix of floating point numbers (single or double).
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       [L,U,piv] = lu(D,'vector');
        %       norm(L*U-D(piv,:), 1)
        %   
        %   See also LU, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = mape( varargin )
        %MAPE Mean absolute percentage error of distributed array data.
        %   
        %   E = MAPE(F,A)
        %   E = MAPE(F,A,"all")
        %   E = MAPE(F,A,DIM)
        %   E = MAPE(F,A,VECDIM)
        %   E = MAPE(...,NANFLAG)
        %   E = MAPE(...,ZEROFLAG)
        %   E = MAPE(...,"Weights",W)
        %   
        %   See also MAPE, DISTRIBUTED.

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

        function [varargout] = matches( varargin )
        %MATCHES True if pattern is equal to the text
        %   
        %   TF = MATCHES(S,PATTERN)
        %   TF = MATCHES(S,PATTERN,'IgnoreCase',IGNORE)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also MATCHES.
        %   

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

        function [varargout] = max( varargin )
        %MAX Largest component of distributed 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 distributed tabular inputs.
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed(magic(N))
        %       m = max(D)
        %       m1 = max(D,[],1)
        %       m2 = max(D,[],2,'omitnan')
        %   
        %   m and m1 are both distributed row vectors, m2 is a distributed column 
        %   vector.
        %   
        %   See also MAX, DISTRIBUTED, MAGIC.
        %   

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

        function [varargout] = maxk( varargin )
        %MAXK Find K largest elements of distributed array
        %   Y = MAXK(X,K)
        %   Y = MAXK(X,K,DIM)
        %   Y = MAXK(...,'ComparisonMethod',C)
        %   [Y,I] = MAXK(...)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed(magic(N))
        %       m = maxk(D,10)
        %       m1 = maxk(D,10,1)
        %       m2 = max(D,10,2,'ComparisonMethod','real')
        %   
        %   m and m1 are a set of K distributed row vectors, m2 is a set of K distributed  
        %   column vectors.
        %   
        %   See also MAXK, DISTRIBUTED, MAGIC.
        %   

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

        function [varargout] = mean( varargin )
        %MEAN Average or mean value of distributed array
        %   S = MEAN(X)
        %   S = MEAN(X,DIM)
        %   S = MEAN(...,'double')
        %   S = MEAN(...,'default')
        %   S = MEAN(...,'omitnan')
        %   S = MEAN(...,'includenan')
        %   S = MEAN(...,Weights = W)
        %   
        %   The 'native' option is not supported.
        %   
        %   Example:
        %       N = 10000;
        %       X = distributed.colon(-N, N);
        %       m = mean(X);
        %       isequal(m, distributed(0)) % true
        %   
        %   See also MEAN, DISTRIBUTED, DISTRIBUTED/MIN, DISTRIBUTED/MAX,
        %            distributed/SUM.

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

        function [varargout] = median( varargin )
        %MEDIAN Median value.
        %   MEDIAN(X)
        %   MEDIAN(X,DIM)
        %   MEDIAN(...,NANFLAG)
        %   MEDIAN(...,Weights = W)
        %   
        %   Limitations:
        %   Distributed table and timetable inputs are not supported.
        %   
        %   See also MEDIAN, DISTRIBUTED.

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

        function [varargout] = meshgrid( varargin )
        %MESHGRID Generate distributed arrays for 2-D functions and 3-D surface plots.
        %   [X,Y] = MESHGRID(x,y)
        %   [X,Y] = MESHGRID(x) is the same as [X,Y] = MESHGRID(x,x)
        %   [X,Y,Z] = MESHGRID(x,y,z)
        %   [X,Y,Z] = MESHGRID(x) is the same as [X,Y,Z] = MESHGRID(x,x,x)
        %   
        %   Class support for inputs:
        %          float: double, single
        %   
        %   Example:
        %            N = 1000;
        %            x = distributed.ones(N, 1);
        %            y = distributed.rand(2*N,1);
        %            [X, Y] = meshgrid(x, y);
        %   
        %   See also MESHGRID, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = milliseconds( varargin )
        %MILLISECONDS Create durations from numeric values in units of milliseconds.
        %   
        %   MS = MILLISECONDS(N)
        %    
        %   See also MILLISECONDS, distributed.
        %   

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

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

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

        function [varargout] = mink( varargin )
        %MINK Find K smallest elements of distributed array
        %   Y = MINK(X,K)
        %   Y = MINK(X,K,DIM)
        %   Y = MINK(...,'ComparisonMethod',C)
        %   [Y,I] = MINK(...)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed(magic(N))
        %       m = mink(D,10)
        %       m1 = mink(D,10,1)
        %       m2 = min(D,10,2,'ComparisonMethod','real')
        %   
        %   m and m1 are a set of K distributed row vectors, m2 is a set of K distributed  
        %   column vectors.
        %   
        %   See also MINK, DISTRIBUTED, MAGIC.
        %   

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

        function [varargout] = minres( varargin )
        %MINRES   Minimum Residual Method for distributed array.
        %   X = MINRES(A,B)
        %   X = MINRES(A,B)
        %   X = MINRES(A,B,TOL)
        %   X = MINRES(A,B,TOL,MAXIT)
        %   X = MINRES(A,B,TOL,MAXIT,M)
        %   X = MINRES(A,B,TOL,MAXIT,M1,M2)
        %   X = MINRES(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = MINRES(A,B,...)
        %   [X,FLAG,RELRES] = MINRES(A,B,...)
        %   [X,FLAG,RELRES,ITER] = MINRES(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = MINRES(A,B,...)
        %      
        %   Note that B must be a non-sparse column vector.
        %   
        %   Limitations:
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using MINRES to solve a large system of distributed array data:
        %       n = 100; 
        %       dOnes = distributed.ones(n,1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -2*dOnes],-1:1,n,n);
        %       db = full(sum(dA,2)); 
        %       tol = 1e-10; 
        %       maxit = 50;
        %       dM = spdiags(4*dOnes, 0, n, n); 
        %       
        %       dX = MINRES(dA, db, tol, maxit, dM);
        %   
        %   See also MINRES, DISTRIBUTED, ONES, SPDIAGS, SUM.

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

        function [varargout] = minus( varargin )
        %- Minus for distributed array
        %   C = A - B
        %   C = MINUS(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.ones(N);
        %       D2 = 2*D1
        %       D3 = D1 - D2
        %   
        %   See also MINUS, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = minute( varargin )
        %MINUTE Minute numbers of datetimes.
        %   
        %   M = MINUTE(T)
        %   
        %   See also MINUTE.
        %   

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

        function [varargout] = minutes( varargin )
        %MINUTES Create durations from numeric values in units of minutes.
        %   
        %   M = MINUTES(N)
        %    
        %   See also MINUTES, distributed.
        %   

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

        function [varargout] = mod( varargin )
        %MOD Modulus after division of distributed array
        %   C = MOD(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D = mod(distributed.colon(1,N),2)
        %   
        %   See also MOD, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = mode( varargin )
        %MODE   Mode, or most frequent value in a sample.
        %   M = MODE(X)
        %   [M,F] = MODE(X)
        %   [...] = MODE(X,DIM)
        %   Limitations:
        %   Distributed table and timetable inputs are not supported.
        %   The third output is not supported for distributed data.
        %   
        %   Example:
        %       % Random integers normally distributed around 0
        %       y = fix(distributed.randn(10000,10));
        %       % Shift the center to 1..10
        %       y = bsxfun(@plus, y, 1:10);
        %       % Mode for each column is now 1:10
        %       m = mode(y)
        %   
        %   See also MODE, MEDIAN, DISTRIBUTED, DISTRIBUTED/MEAN.

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

        function [varargout] = month( varargin )
        %MONTH Month numbers or names of datetimes.
        %   
        %   M = MONTH(T)
        %   
        %   See also MONTH.
        %   

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

        function [varargout] = movevars( varargin )
        %MOVEVARS Move the specified distributed table variables to a new location.
        %   T2 = MOVEVARS(T1, VARS)
        %   T2 = MOVEVARS(T1, VARS, 'Before', LOCATION)
        %   T2 = MOVEVARS(T1, VARS, 'After', LOCATION)
        %   
        %   See also TABLE, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = movmad( varargin )
        %MOVMAD Moving median absolute deviation value for distributed data.
        %   Y = MOVMAD(X,K)
        %   Y = MOVMAD(X,[NB NF])
        %   Y = MOVMAD(...,NRM)
        %   Y = MOVMAD(...,NRMDIM)
        %   Y = MOVMAD(...,MISSING)
        %   Y = MOVMAD(...,'Endpoints',ENDPT)
        %   Y = MOVMAD(X,K,...,'SamplePoints',T)
        %   Y = MOVMAD(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movmad(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVMAD, distributed.

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

        function [varargout] = movmax( varargin )
        %MOVMAX Moving maximum value for distributed data.
        %   Y = MOVMAX(X,K)
        %   Y = MOVMAX(X,[NB NF])
        %   Y = MOVMAX(...,NRM)
        %   Y = MOVMAX(...,NRMDIM)
        %   Y = MOVMAX(...,MISSING)
        %   Y = MOVMAX(...,'Endpoints',ENDPT)
        %   Y = MOVMAX(X,K,...,'SamplePoints',T)
        %   Y = MOVMAX(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movmax(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVMAX, distributed.

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

        function [varargout] = movmean( varargin )
        %MOVMEAN Moving average value for distributed data.
        %   Y = MOVMEAN(X,K)
        %   Y = MOVMEAN(X,[NB NF])
        %   Y = MOVMEAN(...,DIM)
        %   Y = MOVMEAN(...,MISSING)
        %   Y = MOVMEAN(...,'Endpoints',ENDPT)
        %   Y = MOVMEAN(X,K,...,'SamplePoints',T)
        %   Y = MOVMEAN(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movmean(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVMEAN, distributed.

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

        function [varargout] = movmedian( varargin )
        %MOVMEDIAN Moving median value for distributed data.
        %   Y = MOVMEDIAN(X,K)
        %   Y = MOVMEDIAN(X,[NB NF])
        %   Y = MOVMEDIAN(...,NRM)
        %   Y = MOVMEDIAN(...,NRMDIM)
        %   Y = MOVMEDIAN(...,MISSING)
        %   Y = MOVMEDIAN(...,'Endpoints',ENDPT)
        %   Y = MOVMEDIAN(X,K,...,'SamplePoints',T)
        %   Y = MOVMEDIAN(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movmedian(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVMEDIAN, distributed.

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

        function [varargout] = movmin( varargin )
        %MOVMIN Moving minimum value for distributed data.
        %   Y = MOVMIN(X,K)
        %   Y = MOVMIN(X,[NB NF])
        %   Y = MOVMIN(...,NRM)
        %   Y = MOVMIN(...,NRMDIM)
        %   Y = MOVMIN(...,MISSING)
        %   Y = MOVMIN(...,'Endpoints',ENDPT)
        %   Y = MOVMIN(X,K,...,'SamplePoints',T)
        %   Y = MOVMIN(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movmin(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVMIN, distributed.

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

        function [varargout] = movprod( varargin )
        %MOVPROD Moving product value for distributed data.
        %   Y = MOVPROD(X,K)
        %   Y = MOVPROD(X,[NB NF])
        %   Y = MOVPROD(...,NRM)
        %   Y = MOVPROD(...,NRMDIM)
        %   Y = MOVPROD(...,MISSING)
        %   Y = MOVPROD(...,'Endpoints',ENDPT)
        %   Y = MOVPROD(X,K,...,'SamplePoints',T)
        %   Y = MOVPROD(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movprod(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVPROD, distributed.

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

        function [varargout] = movstd( varargin )
        %MOVSTD Moving standard deviation value for distributed data.
        %   Y = MOVSTD(X,K)
        %   Y = MOVSTD(X,[NB NF])
        %   Y = MOVSTD(...,NRM)
        %   Y = MOVSTD(...,NRMDIM)
        %   Y = MOVSTD(...,MISSING)
        %   Y = MOVSTD(...,'Endpoints',ENDPT)
        %   Y = MOVSTD(X,K,...,'SamplePoints',T)
        %   Y = MOVSTD(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movstd(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVSTD, distributed.

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

        function [varargout] = movsum( varargin )
        %MOVSUM Moving sum value for distributed data.
        %   Y = MOVSUM(X,K)
        %   Y = MOVSUM(X,[NB NF])
        %   Y = MOVSUM(...,DIM)
        %   Y = MOVSUM(...,MISSING)
        %   Y = MOVSUM(...,'Endpoints',ENDPT)
        %   Y = MOVSUM(X,K,...,'SamplePoints',T)
        %   Y = MOVSUM(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movsum(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVSUM, distributed.

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

        function [varargout] = movvar( varargin )
        %MOVVAR Moving variance value for distributed data.
        %   Y = MOVVAR(X,K)
        %   Y = MOVVAR(X,[NB NF])
        %   Y = MOVVAR(...,NRM)
        %   Y = MOVVAR(...,NRMDIM)
        %   Y = MOVVAR(...,MISSING)
        %   Y = MOVVAR(...,'Endpoints',ENDPT)
        %   Y = MOVVAR(X,K,...,'SamplePoints',T)
        %   Y = MOVVAR(X,[NB NF],...,'SamplePoints',T)
        %   
        %   Example:
        %      t = 1:10;
        %      x = distributed([4 8 6 -1 -2 -3 -1 3 4 5]);
        %      yc = movvar(x,5);
        %      plot(t,x,t,yc);
        %   
        %   See also MOVVAR, distributed.

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

        function [varargout] = mtimes( varargin )
        %* Matrix multiply for distributed array
        %   C = A * B
        %   C = MTIMES(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       A = distributed.rand(N)
        %       B = distributed.rand(N)
        %       C = A * B
        %   
        %   See also MTIMES, DISTRIBUTED.

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

        function [varargout] = ndgrid( varargin )
        %NDGRID Generate distributed arrays for N-D functions and interpolation.
        %   [X1,X2,X3,...] = NDGRID(x1,x2,x3,...) 
        %   [X1,X2,...] = NDGRID(x) is the same as [X1,X2,...] = NDGRID(x,x,...)
        %       
        %   NDGRID for distributed arrays supports the same syntax as the builtin, with one 
        %   notable exception.  In the 1-D case, X = NDGRID(x) returns a distributed array 
        %   column vector X that contains the elements of the input distributed array x for 
        %   use as a one-dimensional grid.
        %   
        %   Class support for inputs:
        %          float: double, single
        %   
        %   Example:
        %            N = 1000;
        %            x = distributed.ones(N, 1);
        %            y = distributed.rand(2*N,1);
        %            [X, Y] = ndgrid(x, y);
        %   
        %   See also NDGRID, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = ne( varargin )
        %~= Not equal for distributed array
        %   C = A ~= B
        %   C = NE(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       F = D ~= D
        %       T = D ~= D'
        %   
        %   returns F = distributed.false(N) and T is probably the same as
        %   distributed.true(N), but with the main diagonal all false
        %   values.
        %   
        %   See also NE, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = nextpow2( varargin )
        %NEXTPOW2 Next higher power of 2 for distributed arrays
        %   
        %   Y = NEXTPOW2(X)
        %   
        %   Examples:
        %       D = distributed(pi)
        %       E = nextpow2(D)
        %   
        %       X = distributed.colon(1, 5)
        %       Y = nextpow2(X)
        %   
        %   See also NEXTPOW2, DISTRIBUTED, DISTRIBUTED/COLON.
        %   

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

        function [varargout] = nnz( varargin )
        %NNZ Number of nonzero distributed matrix elements
        %   N = NNZ(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.speye(N);
        %       n = nnz(D)  % n = N
        %   
        %   See also NNZ, DISTRIBUTED, DISTRIBUTED/SPEYE.

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

        function [varargout] = nonzeros( varargin )
        %NONZEROS Nonzero distributed matrix elements
        %   NZ = NONZEROS(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.speye(N);
        %       nz = nonzeros(D)
        %   
        %   returns nz = distributed.ones(N,1).
        %   
        %   t = issparse(D)
        %   
        %   returns t = true.
        %   
        %   See also NONZEROS, DISTRIBUTED, DISTRIBUTED/SPEYE.

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

        function [varargout] = norm( varargin )
        %NORM Vector and matrix norms for distributed array
        %   
        %   Supported matrix X syntaxes:
        %   N = NORM(X)
        %   N = NORM(X,2)
        %   N = NORM(X,1)
        %   N = NORM(X,Inf)
        %   N = NORM(X,'fro')
        %   N = NORM(X,P)
        %   
        %   Supported vector X syntaxes:
        %   C = NORM(X)
        %   C = NORM(X,P)
        %   C = NORM(X,Inf)
        %   C = NORM(X,-Inf) 
        %   N = NORM(X,'fro')
        %   
        %   Supported N-D array X syntax:
        %   C = NORM(X,'fro')
        %   
        %   See also NORM, DISTRIBUTED, DISTRIBUTED/NORMEST, DISTRIBUTED/VECNORM.
        %   

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

        function [varargout] = normest( varargin )
        %NORMEST Estimate the distributed matrix 2-norm
        %   nrm = NORMEST(S)
        %   nrm = NORMEST(S,TOL)
        %   [nrm,cnt] = NORMEST(...)
        %   
        %   Class support for input S:
        %       float: double, single
        %       logical
        %   
        %   Example:
        %       n = 1000;
        %       S = diag(distributed.colon(1,n));
        %       nrm = normest(S, 1.0e-4)
        %   
        %   See also NORMEST, DISTRIBUTED, DISTRIBUTED/NORM, DISTRIBUTED/COLON, DISTRIBUTED/DIAG.

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

        function [varargout] = not( varargin )
        %~ Logical NOT for distributed array
        %   B = ~A
        %   B = NOT(A)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.eye(N);
        %       E = ~D
        %   
        %   See also NOT, DISTRIBUTED, DISTRIBUTED/EYE.
        %   

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

        function [varargout] = nthroot( varargin )
        %NTHROOT Real n-th root of real numbers
        %   Y = NTHROOT(X,N)
        %   
        %   Example:
        %       N = 1000;
        %       D = -2*distributed.ones(N);
        %       E = D.^(1/3)
        %       F = nthroot(D,3)
        %   
        %   See also NTHROOT, DISTRIBUTED, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = null( varargin )
        %NULL   Null space.
        %   Z = NULL(A)
        %   Z = NULL(A,tol)
        %   
        %   Limitation:
        %   1. The 'r' syntax or "rational" basis is not supported.
        %   
        %   See also NULL, DISTRIBUTED.

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

        function [varargout] = num2cell( varargin )
        %NUM2CELL Convert numeric distributed array into cell array
        %   C = NUM2CELL(A)
        %   C = NUM2CELL(A,DIMS)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1,N)
        %       C = num2cell(D)
        %       classD = underlyingType(D)
        %       classC = underlyingType(C)
        %   
        %   converts the distributed double row vector D to the distributed cell 
        %   array C. classD is 'double' while classC is 'cell'.
        %   
        %   See also NUM2CELL, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/CELL.

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

        function [varargout] = nzmax( varargin )
        %NZMAX Amount of storage allocated for nonzero distributed matrix elements
        %   N = NZMAX(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.speye(N);
        %       n = nzmax(D)
        %   
        %   returns n = N.
        %   
        %   t = issparse(D)
        %   
        %   returns t = true.
        %   
        %   See also NZMAX, DISTRIBUTED, DISTRIBUTED/SPEYE.
        %   

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

        function [varargout] = or( varargin )
        %| Logical OR for distributed array
        %   C = A | B
        %   C = OR(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.eye(N);
        %       D2 = distributed.rand(N);
        %       D3 = D1 | D2
        %   
        %   returns D3 = distributed.true(N).
        %   
        %   See also OR, DISTRIBUTED, DISTRIBUTED/EYE.
        %   

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

        function [varargout] = pad( varargin )
        %PAD Inserts leading and trailing characters.
        %   S = PAD(M)
        %   S = PAD(M, WIDTH)
        %   S = PAD(M, WIDTH, SIDE)
        %   S = PAD(M, WIDTH, SIDE, PadCharacter)
        %   
        %   See also PAD, DISTRIBUTED/STRING.
        %   

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

        function [varargout] = pagectranspose( varargin )
        %PAGECTRANSPOSE Page-wise complex conjugate transpose on each page of distributed array.
        %   
        %   Y = PAGECTRANSPOSE(X) applies the complex conjugate transpose to each page of N-D array X:
        %      Y(:,:,i) = X(:,:,i)'
        %   
        %   This is equivalent to calling permute(conj(X),[2 1 3:ndims(X)]).
        %   

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

        function [varargout] = pagefun( varargin )
        %PAGEFUN Apply a function to each page of distributed array
        %   PAGEFUN iterates over the pages of a distributed array, applying the same 
        %   function to each page.   
        %   
        %   A = PAGEFUN(FUN, B) applies the function specified by FUN to each page
        %   of the distributed array B, and returns the results in distributed array
        %   A such that A(:,:,I,J,...) = FUN(B(:,:,I,J,...)).  FUN is a function handle 
        %   to a function that takes one two-dimensional input argument.
        %   
        %   A = PAGEFUN(FUN, B, C, ...) evaluates the function specified by FUN using pages of the 
        %   arrays B, C, ... as input arguments with scalar expansion enabled.  Any of the
        %   input page dimensions that are scalar will be virtually replicated to match the 
        %   size of the other arrays in that dimension so that 
        %   A(:,:,I,J,...) = FUN(B(:,:,I,J,...), C(:,:,I,J,...), ...).  At least one of 
        %   the inputs B, C, ... must be a distributed array.  Any other inputs held in CPU 
        %   memory are converted to a distributed array before calling the function.
        %   If an array is to be used in several different PAGEFUN calls it is more 
        %   efficient to convert that array to a distributed array before your series of 
        %   PAGEFUN calls.  The input pages B(:,:,I, J, ...), C(:,:,I, J, ...), ... must 
        %   satisfy all of FUN's input and output requirements.
        %   
        %   [A, B, ...] = PAGEFUN(FUN, C, ...), where FUN is a function handle
        %   to a function that returns multiple outputs, returns distributed arrays
        %   A, B,..., each corresponding to one of the output arguments of FUN.  PAGEFUN
        %   invokes FUN with as many outputs as there are in the call to PAGEFUN.
        %   All elements of A must be the same class; B can be a different class from A, 
        %   but all elements of B must be of the same class.
        %   
        %   PAGEFUN supports most element-wise distributed array functions for FUN. These functions
        %   are also supported:
        %       @conv
        %       @conv2
        %       @ctranspose
        %       @fliplr
        %       @flipud
        %       @inv
        %       @lu
        %       @mldivide
        %       @mrdivide
        %       @mtimes
        %       @norm
        %       @qr
        %       @rot90
        %       @svd
        %       @transpose
        %       @tril
        %       @triu
        %   
        %   Examples:
        %       M = 3;                                  % output number of rows
        %       K = 6;                                  % matrix multiply inner dimension
        %       N = 2;                                  % output number of columns
        %       P1 = 10;                                % size of first page dimension
        %       P2 = 17;                                % size of second page dimension
        %       P3 = 4;                                 % size of third page dimension
        %       P4 = 12;                                % size of fourth page dimension
        %       A = distributed.rand(M, K, P1,  1, P3);
        %       B = distributed.rand(K, N,  1, P2, P3, P4);
        %       C = pagefun(@mtimes, A, B);
        %       size(C)                                 % M x N x P1 x P2 x P3 x P4
        %   
        %       M = 300;                     % output number of rows
        %       K = 500;                     % matrix multiply inner dimension
        %       N = 1000;                    % output number of columns
        %       P = 200;                     % number of pages
        %       A = distributed.rand(M, K);   
        %       B = distributed.rand(K, N, P);
        %       C = pagefun(@mtimes, A, B);
        %       size(C)                      % returns M x N x P 
        %   
        %   See also  DISTRIBUTED, function_handle, arrayfun, bsxfun, gather, pagemtimes.
        %   

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

        function [varargout] = pageinv( varargin )
        %PAGEINV Page-wise matrix inverse for distributed array
        %   Y = PAGEINV(X)
        %   [Y,RC] = PAGEINV(X)
        %   
        %   See also PAGEINV, DISTRIBUTED.
        %   

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

        function [varargout] = pagemldivide( varargin )
        %PAGEMLDIVIDE   Page-wise left matrix divide for distributed array.
        %   X = PAGEMLDIVIDE(A,B)
        %   X = PAGEMLDIVIDE(A,transpA,B)
        %   [X,RCOND] = PAGEMLDIVIDE(...)
        %   
        %   See also PAGEMLDIVIDE, PAGEFUN, DISTRIBUTED.

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

        function [varargout] = pagemrdivide( varargin )
        %PAGEMRDIVIDE   Page-wise right matrix divide for distributed array.
        %   X = PAGEMRDIVIDE(A,B)
        %   X = PAGEMRDIVIDE(B,A,transpA)
        %   [X,RCOND] = PAGEMRDIVIDE(...)
        %   
        %   See also PAGEMRDIVIDE, PAGEFUN, DISTRIBUTED.

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

        function [varargout] = pagemtimes( varargin )
        %PAGEMTIMES   Page-wise matrix multiply for distributed array.
        %   Z = PAGEMTIMES(X,Y)
        %   Z = PAGEMTIMES(X, transpX, Y, transpY)
        %   
        %   Example:
        %   Using PAGEMTIMES to multiply a two batches distributed array data:
        %       M = 3;                                  % output number of rows
        %       K = 6;                                  % matrix multiply inner dimension
        %       N = 2;                                  % output number of columns
        %       P1 = 10;                                % size of first page dimension
        %       P2 = 17;                                % size of second page dimension
        %       P3 = 4;                                 % size of third page dimension
        %       P4 = 12;                                % size of fourth page dimension
        %       dA = distributed.rand(M, K, P1,  1, P3);
        %       dB = distributed.rand(K, N,  1, P2, P3, P4);
        %       dC = pagemtimes(dA, dB);
        %       size(dC)                                % M x N x P1 x P2 x P3 x P4
        %   
        %   See also DISTRIBUTED, PAGEFUN.

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

        function [varargout] = pagenorm( varargin )
        %PAGENORM Page-wise matrix or vector norm for distributed array.
        %   N = PAGENORM(X)
        %   N = PAGENORM(X,p)
        %   N = PAGENORM(X,"fro")
        %   N = PAGENORM(V)
        %   N = PAGENORM(V,p)
        %   
        %   See also PAGENORM, DISTRIBUTED.
        %   

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

        function [varargout] = pagesvd( varargin )
        %PAGESVD   Page-wise singular value decomposition for distributed array.
        %   S = PAGESVD(X)
        %   [U,S] = PAGESVD(X)
        %   [U,S,V] = PAGESVD(X)
        %   [...] = PAGESVD(X, 'econ')
        %   [...] = PAGESVD(..., OUTPUTFORM)
        %   
        %   See also DISTRIBUTED, PAGEFUN.

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

        function [varargout] = pagetranspose( varargin )
        %PAGETRANSPOSE Page-wise transpose on each page of distributed array.
        %   
        %   Y = PAGETRANSPOSE(X) applies the non-conjugate transpose to each page of N-D array X:
        %      Y(:,:,i) = X(:,:,i).'
        %   
        %   This is equivalent to calling permute(X,[2 1 3:ndims(X)]).
        %   

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

        function [varargout] = pcg( varargin )
        %PCG   Preconditioned Conjugate Gradients Method for distributed array.
        %   X = PCG(A,B)
        %   X = PCG(A,B)
        %   X = PCG(A,B,TOL)
        %   X = PCG(A,B,TOL,MAXIT)
        %   X = PCG(A,B,TOL,MAXIT,M)
        %   X = PCG(A,B,TOL,MAXIT,M1,M2)
        %   X = PCG(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = PCG(A,B,...)
        %   [X,FLAG,RELRES] = PCG(A,B,...)
        %   [X,FLAG,RELRES,ITER] = PCG(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = PCG(A,B,...)
        %      
        %   Limitations:
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using PCG to solve a large system of distributed array data:
        %       A = delsq(numgrid('S',100)); % A sparse SPD system
        %       b = full(sum(A,2));
        %       
        %       dA = distributed(A);
        %       db = distributed(b);
        %       tol = 1e-6;
        %       maxit = 500;
        %       dX = pcg(dA,db,tol,maxit);
        %   
        %   See also PCG, DISTRIBUTED.

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

        function [varargout] = permute( varargin )
        %PERMUTE Permute distributed array dimensions
        %   B = PERMUTE(A, ORDER)
        %   
        %   Example:
        %       A = distributed.rand(1,2,3,4);
        %       size(permute(A,[3 2 1 4])) % now it's 3-by-2-by-1-by-4.
        %   
        %   See also PERMUTE, SIZE, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = planerot( varargin )
        %PLANEROT   Givens plane rotation.
        %   [G,Y] = PLANEROT(X)
        %   
        %   Example:
        %       x = distributed([1;2]);
        %       [G,y] = planerot(x)

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

        function [varargout] = plus( varargin )
        %+ Plus for distributed array
        %   C = A + B
        %   C = PLUS(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.ones(N);
        %       D2 = 2*D1
        %       D3 = D1 + D2
        %   
        %   See also PLUS, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = polyfit( varargin )
        %POLYFIT Convert roots to polynomial.
        %   P = POLYFIT(X,Y,N)
        %   [P,S] = POLYFIT(X,Y,N)
        %   [P,S,MU] = POLYFIT(X,Y,N)
        %   
        %   Example:
        %       x = distributed.linspace(0, 3*pi, 1000);
        %       y = sin(x);
        %       p = polyfit(x, y, 5);
        %       plot(x, y, 'r', x, polyval(p,x), 'b');
        %   
        %   See also POLYFIT, SIN, POLYVAL, DISTRIBUTED, DISTRIBUTED.LINSPACE.

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

        function [varargout] = polyval( varargin )
        %POLYVAL Evaluate polynomial.
        %   Y = POLYVAL(P,X)
        %   [Y,DELTA] = POLYVAL(P,X,S)
        %   Y = POLYVAL(P,X,[],MU)
        %   [Y,DELTA] = POLYVAL(P,X,S,MU)
        %   
        %   Example:
        %   Evaluate the polynomial p(x) = 3x^2+2x+1 at x = 5,7, and 9:
        %       p = distributed([3 2 1]);
        %       polyval(p,[5 7 9])
        %   
        %   See also POLYVAL, DISTRIBUTED.

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

        function [varargout] = polyvalm( varargin )
        %POLYVALM  Evaluate polynomial with matrix argument.
        %   Y = polyvalm(P,X)
        %   
        %   Example:
        %       P = distributed([1 -29 72 -29 1]);
        %       X = distributed(magic(4)); 
        %       polyvalm(P,X)
        %   
        %   See also POLYVALM, DISTRIBUTED.

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

        function [varargout] = posixtime( varargin )
        %POSIXTIME Convert datetimes to Posix times.
        %   
        %   P = POSIXTIME(T)
        %   
        %   See also POSIXTIME.
        %   

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

        function [varargout] = pow2( varargin )
        %POW2 Base 2 power and scale floating point number for distributed array
        %   X = POW2(Y) for each element of distributed array Y is 2 raised to the power Y.
        %   
        %   X = POW2(F,E) for each element of the distributed array F and a integer
        %   distributed array E computes distributed array X = F .* (2 .^ E).  The 
        %   result is computed quickly by simply adding E to the floating point exponent 
        %   of F.  This corresponds to the ANSI C function ldexp() and the IEEE
        %   floating point standard function scalbn().
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1, N)
        %       E = pow2(D)
        %   
        %   See also POW2, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = power( varargin )
        %.^ Array power for distributed array
        %   C = A .^ B
        %   C = POWER(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = 2*distributed.eye(N);
        %       D2 = D1 .^ 2
        %   
        %   See also POWER, DISTRIBUTED, DISTRIBUTED/EYE.

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

        function [varargout] = prod( varargin )
        %PROD Product of elements of distributed array
        %   PROD(X)
        %   PROD(X,'double')
        %   PROD(X,'native')
        %   PROD(X,'default')
        %   PROD(X,DIM)
        %   PROD(X,DIM,'double')
        %   PROD(X,DIM,'native')
        %   PROD(X,DIM,'default')
        %   PROD(...,'omitnan')
        %   PROD(...,'includenan')
        %   
        %   The order of the products within the PROD operation is not defined, so
        %   the PROD operation on a distributed array might not return exactly the same 
        %   answer as the PROD operation on the corresponding MATLAB numeric array.
        %   In particular, the differences might be significant when X is a signed
        %   integer type and its product is accumulated natively.
        %   
        %   Example:
        %       N = 1000;
        %       D = 4 * (distributed.colon(1, N) .^ 2);
        %       D2 = D ./ (D - 1);
        %       p = prod(D2);
        %       norm(p-pi/2,'inf')
        %   
        %    p is approximately pi/2 (by the Wallis product)
        %   
        %   See also PROD, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = psi( varargin )
        %PSI  Psi (polygamma) function for distributed arrays
        %   Y = PSI(X)
        %   Y = PSI(K,X)
        %   
        %   Example:
        %       N = 1000;
        %       K = 1;
        %       X = 10*rand(N, 'distributed');
        %       psi(K,X)
        %   
        %   See also PSI, DISTRIBUTED/GAMMA, DISTRIBUTED.
        %   

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

        function [varargout] = qmr( varargin )
        %QMR   Quasi-Minimal Residual Method for distributed array.
        %   X = QMR(A,B)
        %   X = QMR(A,B)
        %   X = QMR(A,B,TOL)
        %   X = QMR(A,B,TOL,MAXIT)
        %   X = QMR(A,B,TOL,MAXIT,M)
        %   X = QMR(A,B,TOL,MAXIT,M1,M2)
        %   X = QMR(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = QMR(A,B,...)
        %   [X,FLAG,RELRES] = QMR(A,B,...)
        %   [X,FLAG,RELRES,ITER] = QMR(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = QMR(A,B,...)
        %      
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using QMR to solve a large system of distributed array data:
        %       n = 1e6; 
        %       dOnes = distributed.ones(n,1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -dOnes],-1:1,n,n);
        %       db = sum(dA,2);
        %       tol = 1e-8; 
        %       maxit = 50; 
        %       
        %       dX = QMR(dA,db,tol,maxit)
        %   
        %   See also QMR, DISTRIBUTED.

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

        function [varargout] = qr( varargin )
        %QR Orthogonal-triangular decomposition for distributed matrix
        %   [Q,R] = QR(A)
        %   [Q,R] = QR(A,"econ")
        %   [Q,R] = QR(A,0)
        %     Note: This syntax is not recommended. Use the "econ" and "vector"
        %           options instead.
        %   [Q,R,P] = QR(A)
        %   [Q,R,P] = QR(A,"econ")
        %   [Q,R,P] = QR(A,0)
        %     Note: This syntax is not recommended. Use the "econ" and "vector"
        %           options instead.
        %   [Q,R,P] = QR(...,"vector")
        %   [Q,R,P] = QR(...,"matrix")
        %   
        %   Limitations:
        %   1. A must be a full distributed matrix of floating point numbers (single or
        %   double). Sparse arrays are not supported.
        %   
        %   2. The following syntax is not supported:
        %       X = QR(A)
        %   
        %   See also QR, DISTRIBUTED.

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

        function [varargout] = quarter( varargin )
        %QUARTER Quarter numbers of datetimes.
        %   
        %   Q = QUARTER(T)
        %   
        %   See also QUARTER.
        %   

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

        function [varargout] = rad2deg( varargin )
        %RAD2DEG Convert angles from radians to degrees.
        %   D = RAD2DEG(R)
        %   
        %   Example:
        %       n = 1000;
        %       r = distributed.linspace(0,pi,n);
        %       d = rad2deg(r)
        %   
        %   See also RAD2DEG, DISTRIBUTED, DISTRIBUTED/LINSPACE.

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

        function [varargout] = rdivide( varargin )
        %./ Right array divide for distributed matrix
        %   C = A ./ B
        %   C = RDIVIDE(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.colon(1, N)'
        %       D2 = 1 ./ D1
        %   
        %   See also RDIVIDE, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = real( varargin )
        %REAL Complex real part of distributed array
        %   Y = REAL(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = complex(3*distributed.ones(N),4*distributed.ones(N))
        %       E = real(D)
        %   
        %   See also REAL, DISTRIBUTED.

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

        function [varargout] = reallog( varargin )
        %REALLOG Real logarithm of distributed array
        %   Y = REALLOG(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = -exp(1)*distributed.ones(N)
        %       try reallog(D), catch, disp('negative input!'), end
        %       E = reallog(-D)
        %   
        %   See also REALLOG, DISTRIBUTED.

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

        function [varargout] = realpow( varargin )
        %REALPOW Real power of distributed array
        %   Z = REALPOW(X,Y)
        %   
        %   Example:
        %       N = 1000;
        %       D = -8*distributed.ones(N)
        %       try realpow(D,1/3), catch, disp('complex output!'), end
        %       E = realpow(-D,1/3)
        %   
        %   See also REALPOW, DISTRIBUTED.

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

        function [varargout] = realsqrt( varargin )
        %REALSQRT Real square root of distributed array
        %   Y = REALSQRT(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = -4*distributed.ones(N)
        %       try realsqrt(D), catch, disp('negative input!'), end
        %       E = realsqrt(-D)
        %   
        %   See also REALSQRT, DISTRIBUTED.

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

        function [varargout] = rem( varargin )
        %REM Remainder after division for distributed array
        %   C = REM(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D = rem(distributed.colon(1, N),2)
        %   
        %   See also REM, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = removevars( varargin )
        %REMOVEVARS Delete variables from a distributed table or timetable.
        %   T2 = REMOVEVARS(T1, VARS)
        %   
        %   See also TABLE, DISTRIBUTED.
        %   

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

        function [varargout] = repelem( varargin )
        %REPELEM Replicate elements of an array.
        %   U = REPELEM(V,N)
        %   B = REPELEM(A, R1, ..., RN)
        %   
        %   See also REPELEM, DISTRIBUTED.

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

        function [varargout] = replace( varargin )
        %REPLACE Replace string with another.
        %   
        %   MODIFIEDSTR = REPLACE(ORIGSTR,OLDSUBSTR,NEWSUBSTR) 
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also REPLACE.
        %   

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

        function [varargout] = replaceBetween( varargin )
        %REPLACEBETWEEN Replace a substring specified by bounds with new text.
        %   S = REPLACEBETWEEN(STR, START, END, TEXT)
        %   S = REPLACEBETWEEN(STR, START_STR, END_STR, TEXT)
        %   S = REPLACEBETWEEN(..., 'Boundaries', B)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also REPLACEBETWEEN, distributed/STRING.
        %   

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

        function [varargout] = repmat( varargin )
        %REPMAT Replicate and tile a distributed array
        %   B = repmat(A,M,N) creates a large distributed array B consisting of an M-by-N
        %   tiling of copies of A. The size of B is [size(A,1)*M, size(A,2)*N].  
        %   
        %   B = repmat(A,N) creates an N-by-N tiling.
        %   B = repmat(A,[M N]) accomplishes the same result as repmat(A,M,N).
        %    
        %   B = repmat(A,[M N P ...]) tiles the distributed array A to produce a 
        %   multidimensional distributed array B composed of copies of A. The size of B is 
        %   [size(A,1)*M, size(A,2)*N, size(A,3)*P, ...].
        %   
        %   B = repmat(A,M,N,P,...) accomplishes the same result as B = repmat(A,[M N P ...]).
        %    
        %   Example:
        %       A = distributed.rand(10);
        %       B = repmat( A, 200, 300 );
        %       size(B) % B is a 2000 x 3000 array of tiled copies of A
        %   
        %   See also REPMAT, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = reshape( varargin )
        %RESHAPE Change size of distributed array
        %   RESHAPE(G,M,N) returns the M-by-N distributed whose elements are 
        %   taken columnwise from G. An error results if G does not 
        %   have M*N elements.
        %   
        %   RESHAPE(G,M,N,P,...) returns an N-D array with the same
        %   elements as G but reshaped to have the size M-by-N-by-P-by-...
        %   M*N*P*... must be the same as PROD(SIZE(G)).
        %   
        %   RESHAPE(G,[M N P ...]) is the same thing.
        %   
        %   RESHAPE(G,...,[],...) calculates the length of the dimension
        %   represented by [], such that the product of the dimensions 
        %   equals PROD(SIZE(G)). PROD(SIZE(G)) must be evenly divisible 
        %   by the product of the known dimensions. You can use only one 
        %   occurrence of [].
        %   
        %   In general, RESHAPE(G,SIZ) returns an N-D array with the same
        %   elements as G but reshaped to the size SIZ.  PROD(SIZ) must be
        %   the same as PROD(SIZE(G)). 
        %   
        %   
        %   Example:
        %       x = distributed.colon(1,1000);
        %       y = reshape(x,10,10,10)
        %   
        %   See also RESHAPE, DISTRIBUTED, DISTRIBUTED/COLON.

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

        function [varargout] = reverse( varargin )
        %REVERSE Reverse the order of characters in string
        %   
        %   A = REVERSE(S)
        %   
        %   See also REVERSE.
        %   

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

        function [varargout] = rgb2gray( varargin )
        %RGB2GRAY Convert RGB distributed image or colormap to grayscale.
        %   RGB2GRAY converts RGB distributed images to grayscale by eliminating the
        %   hue and saturation information while retaining the
        %   luminance.
        %   
        %   I = RGB2GRAY(RGB) converts the truecolor distributed image RGB to the
        %   grayscale intensity image I.
        %   
        %   NEWMAP = RGB2GRAY(MAP) returns a grayscale colormap
        %   equivalent to MAP.
        %   
        %   Class Support
        %   -------------
        %   The output distributed image I has the same class as the input
        %   image. If the input is a colormap, the input and output colormaps are
        %   both of class double.
        %   
        %   Example
        %   -------
        %   I = distributed(imread('board.tif'));
        %   J = rgb2gray(I);
        %   figure, imshow(I), figure, imshow(J);
        %   
        %   [X,map] = distributed(imread('trees.tif'));
        %   gmap = rgb2gray(map);
        %   figure, imshow(X,map), figure, imshow(X,gmap);
        %   
        %   See also RGB2GRAY, IMSHOW, DISTRIBUTED.

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

        function [varargout] = rgb2hsv( varargin )
        %RGB2HSV Convert red-green-blue colors to hue-saturation-value.
        %   H = RGB2HSV(M) converts an RGB color map to an HSV color map.
        %   
        %   HSV = RGB2HSV(RGB) converts the RGB image RGB (3-D array) to the
        %   equivalent HSV image HSV (3-D array).
        %   
        %   Example:
        %       rgb = distributed.randi([0 255], 1024, 768, 3, 'uint8');
        %       hsv = rgb2hsv(rgb)
        %   
        %   See also RGB2HSV, DISTRIBUTED, DISTRIBUTED/RANDI.

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

        function [varargout] = rmfield( varargin )
        %RMFIELD Remove fields from a structure distributed array
        %   S = RMFIELD(S,'field')
        %   S = RMFIELD(S,FIELDS)
        %   
        %   Example:
        %       matrices = { 1,  2,  3,  4,  5,  6,  7,  8,  9,  10};
        %       names    = {'a','b','c','d','e','f','g','h','i','j'};
        %       s = struct('matrix', matrices, 'name', names);
        %       S = distributed(s)
        %       S = rmfield(S,'name')
        %       classS = underlyingType(S)
        %   
        %   removes the field named 'name' from the distributed array of structs S.
        %   classS is 'struct'.
        %   
        %   See also RMFIELD, DISTRIBUTED.

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

        function [varargout] = rmmissing( varargin )
        %RMMISSING Remove rows or columns with missing entries
        %   
        %   B = RMMISSING(A)
        %   B = RMMISSING(A,DIM)
        %   B = RMMISSING(A,...,'MinNumMissing',N)
        %   [B,I] = RMMISSING(A,...)
        %   
        %   See also: RMMISSING, DISTRIBUTED.
        %   

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

        function [varargout] = rmse( varargin )
        %RMSE Root-mean-square error of distributed array data.
        %   
        %   E = RMSE(F,A)
        %   E = RMSE(F,A,"all")
        %   E = RMSE(F,A,DIM)
        %   E = RMSE(F,A,VECDIM)
        %   E = RMSE(...,NANFLAG)
        %   E = RMSE(...,"Weights",W)
        %   
        %   See also RMSE, DISTRIBUTED.

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

        function [varargout] = round( varargin )
        %ROUND Round towards nearest integer for distributed array
        %   Y = ROUND(X)
        %   Y = ROUND(X,N)
        %   Y = ROUND(X,N,TYPE)
        %   Y = ROUND(...,TieBreaker=DIRECTION)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1, N)./2
        %       E = round(D)
        %   
        %   See also ROUND, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS

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

        function [varargout] = sec( varargin )
        %SEC Secant of distributed array in radians
        %   Y = SEC(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = sec(D)
        %   
        %   See also SEC, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = secd( varargin )
        %SECD Secant of distributed array in degrees
        %   Y = SECD(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = secd(D)
        %   
        %   See also SECD, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = sech( varargin )
        %SECH Hyperbolic secant of distributed array
        %   Y = SECH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.zeros(N);
        %       E = sech(D)
        %   
        %   See also SECH, DISTRIBUTED, DISTRIBUTED/ZEROS.

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

        function [varargout] = second( varargin )
        %SECOND Second numbers of datetimes.
        %   
        %   S = SECOND(T)
        %   S = SECOND(T,KIND)
        %   
        %   See also SECOND.
        %   

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

        function [varargout] = seconds( varargin )
        %SECONDS Create durations from numeric values in units of seconds.
        %   
        %   S = SECONDS(N)
        %    
        %   See also SECONDS, distributed.
        %   

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

        function [varargout] = setdiff( varargin )
        %SETDIFF Set difference for distributed array data.
        %   C = setdiff(A,B)    
        %   C = setdiff(A,B,'rows')    
        %   [C,IA] = setdiff(A,B)    
        %   [C,IA] = setdiff(A,B,'rows')    
        %   [C,IA] = setdiff(A,B,'stable') 
        %   [C,IA] = setdiff(A,B,'rows','stable') 
        %   [C,IA] = setdiff(A,B,'sorted') 
        %   [C,IA] = setdiff(A,B,'rows','sorted') 
        %   
        %   Limitations:
        %   The 'legacy' flag is not supported.
        %   1. Table, timetable, categorical, datetime and duration inputs are not supported.
        %   2. Char and string inputs are not supported when A or B is a cell array of char vectors. Convert cell array of char vectors input arguments to string instead.
        %   
        %   See also setdiff, distributed.

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

        function [varargout] = setxor( varargin )
        %SETXOR Set setxor for distributed array data.
        %   C = setxor(A,B)    
        %   [C,IA,IB] = setxor(A,B)    
        %   [C,IA,IB] = setxor(A,B,'rows')    
        %   [C,IA,IB] = setxor(A,B,'stable') 
        %   [C,IA,IB] = setxor(A,B,'stable','rows') 
        %   [C,IA,IB] = setxor(A,B,'sorted') 
        %   [C,IA,IB] = setxor(A,B,'sorted','rows') 
        %   
        %   Limitations:
        %   The 'legacy' flag is not supported.
        %   1. Table, timetable, categorical, datetime and duration inputs are not supported.
        %   2. Char and string inputs are not supported when A or B is a cell array of char vectors. Convert cell array of char vectors input arguments to string instead.
        %   
        %   See also setxor, distributed.

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

        function [varargout] = shiftdim( varargin )
        %SHIFTDIM Shift dimensions of a distributed array.
        %   B = SHIFTDIM(X,N) 
        %   [B, NSHIFTS] = SHIFTDIM(X)    
        %   
        %   See also SHIFTDIM, CIRCSHIFT, RESHAPE, SQUEEZE, DISTRIBUTED.

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

        function [varargout] = sign( varargin )
        %SIGN Signum function for distributed array
        %   Y = SIGN(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1, N) - ceil(N/2)
        %       E = sign(D)
        %   
        %   See also SIGN, DISTRIBUTED, DISTRIBUTED/COLON, DISTRIBUTED/ZEROS.

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

        function [varargout] = sin( varargin )
        %SIN Sine of distributed array in radians
        %   Y = SIN(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = pi/2*distributed.ones(N);
        %       E = sin(D)
        %   
        %   See also SIN, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = sind( varargin )
        %SIND Sine of distributed array in degrees
        %   Y = SIND(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = pi/2*distributed.ones(N);
        %       E = sind(D)
        %   
        %   See also SIND, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = single( varargin )
        %SINGLE Convert distributed array to single precision
        %   S = SINGLE(X)
        %   
        %   Example:
        %       N = 1000;
        %       Du = distributed.ones(N,'uint32');
        %       Ds = single(Du)
        %       classDu = underlyingType(Du)
        %       classDs = underlyingType(Ds)
        %   
        %   converts the N-by-N uint32 distributed array Du to the
        %   single distributed array Ds.
        %   classDu is 'uint32' while classDs is 'single'.
        %   
        %   See also SINGLE, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = sinh( varargin )
        %SINH Hyperbolic sine of distributed array
        %   Y = SINH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.inf(N);
        %       E = sinh(D)
        %   
        %   See also SINH, DISTRIBUTED, DISTRIBUTED/INF.

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

        function [varargout] = sinpi( varargin )
        %SINPI  Compute sin(X*pi) accurately.
        %   Y = SINPI(X)
        %   
        %   See also SINPI, DISTRIBUTED.
        %   

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

        function [varargout] = sort( varargin )
        %SORT Sort distributed array in ascending or descending order.
        %   B = SORT(A) 
        %   B = SORT(A, DIM)
        %   B = SORT(A, DIRECTION) 
        %   B = SORT(A, DIM,DIRECTION) 
        %   B = SORT(A, ..., 'MissingPlacement', M) 
        %   B = SORT(A, ..., 'ComparisonMethod', C) 
        %   [B,I] = SORT(A, ...)
        %   
        %   Limitation:
        %   Table, timetable and datetime inputs are not supported.
        %   
        %   See also SORT, DISTRIBUTED, DISTRIBUTED/RANDN

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

        function [varargout] = sortrows( varargin )
        %SORTROWS Sort rows of distributed array matrix in ascending order.
        %   B = SORTROWS(A)
        %   B = SORTROWS(A, COL) 
        %   B = SORTROWS(A, DIRECTION) 
        %   B = SORTROWS(A, COL, DIRECTION)
        %   B = SORTROWS(A, ..., 'MissingPlacement', M)
        %   B = SORTROWS(A, ..., 'ComparisonMethod', C)
        %   [B,I] = SORTROWS(A, ...)
        %   
        %   Limitations:
        %   Sorting cell arrays is not supported.
        %   Table, timetable, datetime and duration inputs are not supported.
        %   
        %   See also SORTROWS, DISTRIBUTED, DISTRIBUTED.RANDN

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

        function [varargout] = sparse( varargin )
        %SPARSE Create sparse distributed matrix
        %   S = SPARSE(F)
        %   S = SPARSE(M,N)  (S is a replicated MxN sparse array with all zero entries)
        %   S = SPARSE(ROWS,COLS,VALS)
        %   S = SPARSE(ROWS,COLS,VALS,M,N)
        %   S = SPARSE(ROWS,COLS,VALS,M,N,NZMAX)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.eye(N);
        %       S = sparse(D);
        %       issparse(D) % false
        %       issparse(S) % true
        %       isequal(S, distributed.speye(N)) % true
        %   
        %   See also SPARSE, DISTRIBUTED, DISTRIBUTED/EYE, DISTRIBUTED/SPEYE.

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

        function [varargout] = spdiags( varargin )
        %SPDIAGS Sparse matrix formed from diagonals.
        %   
        %   [B,d] = SPDIAGS(A)
        %   B = SPDIAGS(A,d)
        %   A = SPDIAGS(B,d,A)
        %   A = SPDIAGS(B,d,m,n)
        %   
        %   
        %   Example:
        %       n = 1e3;
        %       b = distributed.ones(n,1);
        %       A = SPDIAGS([b -2*b b], -1:1, 1e3, 1e3);
        %   
        %   See also SPDIAGS, DISTRIBUTED

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

        function [varargout] = spfun( varargin )
        %SPFUN Apply function to nonzero distributed matrix elements
        %   D2 = SPFUN(FUN,D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.sprand(N, N, 0.2)
        %       F = spfun(@exp, D)
        %   
        %   F has the same sparsity pattern as D (except for underflow), whereas 
        %   EXP(D) has 1's where D has 0's.
        %   
        %   Note: On each lab, the function FUN only receives as input the nonzero
        %   elements of D that are local to that lab.  Therefore, functions that
        %   operate element-by-element are the most appropriate for use with
        %   SPFUN.
        %   
        %   See also SPFUN, DISTRIBUTED, DISTRIBUTED/SPRAND.

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

        function [varargout] = spones( varargin )
        %SPONES Replace nonzero sparse distributed matrix elements with ones
        %   D2 = SPONES(D)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed(sprand(N,N,1/N));
        %       D2 = spones(D1)
        %   
        %   returns D2 with the same sparsity structure as D1, but 1's in the nonzero
        %   positions.
        %   
        %   t1 = issparse(D1)
        %   t2 = issparse(D2)
        %   
        %   returns t1 and t2 both equal to true.
        %   
        %   See also SPONES, DISTRIBUTED, DISTRIBUTED/SPRAND.
        %   

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

        function [varargout] = sqrt( varargin )
        %SQRT Square root of distributed array
        %   Y = SQRT(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = 2 * distributed.ones(N)
        %       E = sqrt(D)
        %   
        %   See also SQRT, DISTRIBUTED.

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

        function [varargout] = standardizeMissing( varargin )
        %STANDARDIZEMISSING Insert standard missing data indicators into a distributed table.
        %   B = STANDARDIZEMISSING(A,INDICATORS)
        %   B = STANDARDIZEMISSING(...,'DataVariables',DATAVARS)
        %   B = STANDARDIZEMISSING(...,'ReplaceValues',TF)
        %   
        %   See also STANDARDIZEMISSING, DISTRIBUTED.
        %   

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

        function [varargout] = startsWith( varargin )
        %STARTSWITH True if string starts with pattern
        %   
        %   TF = STARTSWITH(S,PATTERN)
        %   TF = STARTSWITH(S,PATTERN,'IgnoreCase',IGNORE)
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also STARTSWITH.
        %   

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

        function [varargout] = str2double( varargin )
        %STR2DOUBLE Convert distributed array of strings to double precision values.
        %   X = STR2DOUBLE(S)
        %   
        %   Note that S must be an array of strings or a cell array of char vectors.
        %   
        %   Example:
        %       s = { '1.1',  '2.2',  '3.3',  'nan' };
        %       S = distributed(s)
        %       C = str2double(S)
        %   
        %   See also STR2DOUBLE, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = strcmp( varargin )
        %STRCMP Compare distributed arrays of strings.
        %   TF = STRCMP(S1,S2)
        %   
        %   Note that S1 and S2 must be a single string, a distributed array of strings
        %   or a cell array of char vectors.
        %   
        %   Example:
        %       s1 = { 'Hello', 'Goodbye', 'Farewell', 'Good job' };
        %       S1 = distributed(s1)
        %       tf = strcmp(S1, 'Goodbye')
        %   
        %   See also STRCMP, DISTRIBUTED/STRCMPI, DISTRIBUTED/STRNCMP, DISTRIBUTED/STRNCMPI, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = strcmpi( varargin )
        %STRCMPI Compare distributed arrays of strings ignoring case.
        %   TF = STRCMPI(S1,S2)
        %   
        %   Note that S1 and S2 must be a single string, a distributed array of strings
        %   or a cell array of char vectors.
        %   
        %   Example:
        %       s1 = { 'Hello', 'Goodbye', 'Farewell', 'Good job' };
        %       S1 = distributed(s1)
        %       tf = strcmpi(S1, 'goodbye')
        %   
        %   See also STRCMP, DISTRIBUTED/STRCMP, DISTRIBUTED/STRNCMP, DISTRIBUTED/STRNCMPI, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = strfind( varargin )
        %STRFIND  Find one string within another.
        %   K = STRFIND(TEXT,PATTERN)
        %   
        %   Note that TEXT must be a distributed array of strings or cell array
        %   of char vectors. The output is always a cell array of index vectors.
        %   
        %   Example:
        %       s = {'How much wood'; 'would a woodchuck chuck?'};
        %       S = distributed(s);
        %       strfind(S,'wo')
        %   
        %   Limitations:
        %   Pattern objects are not supported.
        %   
        %   See also STRFIND, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = string( varargin )
        %STRING Convert distributed array to a string
        %   S = STRING(X)
        %   
        %   Example:
        %       N = 1000;
        %       Du = distributed.ones(N,'uint32');
        %       Ds = string(Du)
        %       classDu = underlyingType(Du)
        %       classDs = underlyingType(Ds)
        %   
        %   See also STRING, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = strip( varargin )
        %STRIP Remove leading and trailing characters.
        %   S = STRIP(M)
        %   S = STRIP(M, SIDE)
        %   S = STRIP(M, SIDE, StripCharacter)
        %   
        %   See also STRIP, distributed/STRING.
        %   

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

        function [varargout] = strlength( varargin )
        %STRLENGTH Lengths of string elements
        %   
        %   L = STRLENGTH(S)
        %   
        %   See also STRLENGTH.
        %   

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

        function [varargout] = strncmp( varargin )
        %STRNCMP Compare first N characters of distributed arrays of strings.
        %   TF = STRNCMP(S1,S2,N)
        %   
        %   Note that S1 and S2 must be a single string, a distributed array of strings
        %   or a cell array of char vectors.
        %   
        %   Example:
        %       s1 = { 'Hello', 'Goodbye', 'Farewell', 'Good job' };
        %       S1 = distributed(s1)
        %       tf = strncmp(S1, 'Good', 4)
        %   
        %   See also STRNCMPI, DISTRIBUTED/STRCMP, DISTRIBUTED/STRNCMP, DISTRIBUTED/STRNCMPI, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = strncmpi( varargin )
        %STRNCMPI Compare first N characters of distributed arrays of strings ignoring case.
        %   TF = STRNCMPI(S1,S2,N)
        %   
        %   Note that S1 and S2 must be a single string, a distributed array of strings
        %   or a cell array of char vectors.
        %   
        %   Example:
        %       s1 = { 'Hello', 'Goodbye', 'Farewell', 'Good job' };
        %       S1 = distributed(s1)
        %       tf = strncmpi(S1, 'good', 4)
        %   
        %   See also STRNCMPI, DISTRIBUTED/STRCMP, DISTRIBUTED/STRCMPI, DISTRIBUTED/STRNCMP, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = strrep( varargin )
        %STRREP  Replace string with another.
        %   MODIFIEDSTR = STRREP(ORIGSTR,OLDSUBSTR,NEWSUBSTR)
        %   
        %   Note that ORIGSTR must be a distributed array of strings or a cell array
        %   of char vectors. OLDSUBSTR, NEWSUBSTR can be single strings or arrays
        %   of strings of the same size as ORIGSTR.
        %   
        %   Example:
        %       c_files = {'c:\cookies.m'; ...
        %                  'c:\candy.m';   ...
        %                  'c:\calories.m'};
        %       c_files_d = distributed(c_files);
        %       d_files_d = strrep(c_files_d, 'c:', 'd:')
        %   
        %   See also STRREP, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = strtrim( varargin )
        %STRTRIM Remove leading and trailing whitespace from distributed array of strings.
        %   S = STRTRIM(M)
        %   
        %   Note that M must be an array of strings or a cell array of char vectors.
        %   
        %   Example:
        %       a = { 'Hello  ',  '  Goodbye' };
        %       A = distributed(a)
        %       B = strtrim(A)
        %   
        %   See also STRTRIM, DISTRIBUTED/DEBLANK, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = struct2cell( varargin )
        %STRUCT2CELL Convert structure distributed array to cell distributed array
        %   C = STRUCT2CELL(S)
        %   
        %   If the original struct array is distributed along dimension DIM, the
        %   resulting cell array will be distributed along dimension DIM+1.
        %   
        %   Example:
        %       matrices = { 1,  2,  3,  4,  5,  6,  7,  8,  9,  10};
        %       names    = {'a','b','c','d','e','f','g','h','i','j'};
        %       s = struct('matrix', matrices, 'name', names);
        %       S = distributed(s)
        %       C = struct2cell(S)
        %       classS = underlyingType(S)
        %       classC = underlyingType(C)
        %   
        %   converts the 1-by-10 distributed array of structs S to the
        %   2-by-1-by-10 distributed cell array C.
        %   classS is 'struct' while classC is 'cell'.
        %   
        %   See also STRUCT2CELL, DISTRIBUTED.

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

        function [varargout] = subsindex( varargin )
        %SUBSINDEX Subscript index for distributed array
        %   
        %   OUTIDX = SUBSINDEX(INIDX) accepts a distributed input INIDX, and returns the 
        %   index OUTIDX of zero-based integer values for use in indexing.  The 
        %   class of OUTIDX is the same as the underlying class of INIDX.  
        %   
        %   See also DISTRIBUTED.

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

        function [varargout] = sum( varargin )
        %SUM Sum of elements of distributed array
        %   SUM(X)
        %   SUM(X,'double')
        %   SUM(X,'native')
        %   SUM(X,'default')
        %   SUM(X,DIM)
        %   SUM(X,DIM,'double')
        %   SUM(X,DIM,'native')
        %   SUM(X,DIM,'default')
        %   SUM(...,'omitnan')
        %   SUM(...,'includenan')
        %   
        %   The order of the additions within the SUM operation is not defined, so
        %   the SUM operation on a distributed array might not return exactly the same 
        %   answer as the SUM operation on the corresponding MATLAB numeric array.
        %   In particular, the differences might be significant when X is a signed
        %   integer type and its sum is accumulated natively.
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.colon(1,N);
        %       s = sum(D);
        %       isequal(s, (1+N)*N/2) % true
        %   
        %   See also SUM, DISTRIBUTED, DISTRIBUTED/ZEROS.
        %   
        %   

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

        function [varargout] = svd( varargin )
        %SVD Singular value decomposition of distributed array
        %   S = SVD(A)
        %   [U,S,V] = SVD(A)
        %   [...] = SVD(A,"econ")
        %   [...] = SVD(...,"vector")
        %   [...] = SVD(...,"matrix")
        %   
        %   Limitations:
        %   1. If A is rectangular, you must specify the "econ" option.
        %   
        %   See also SVD, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = svds( varargin )
        %SVDS   Find a few largest singular values and vectors of a distributed matrix.
        %   S = SVDS(A)
        %   S = SVDS(A,K)
        %   S = SVDS(A,K,'largest')
        %   S = SVDS(A,K,'largest',NAME,VALUE)
        %   S = SVDS(A,K,'largest',OPTIONS)
        %   
        %   [U,S,V] = SVDS(A,...)
        %   [U,S,V,FLAG] = SVDS(A,...)
        %   
        %   The following syntaxes are not supported for distributed array:
        %   [...] = SVDS(A,K,'smallest')
        %   [...] = SVDS(A,K,'smallestnz')
        %   
        %   Example:
        %       A = distributed(gallery('neumann',100));
        %       sl = SVDS(A,10)
        %   
        %   A must be double matrix. Both real and
        %   complex types are supported.
        %   
        %   See also SVD, EIGS, DISTRIBUTED, DISTRIBUTED/SVD, DISTRIBUTED/EIG.

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

        function [varargout] = svdsketch( varargin )
        %SVDS  Matrix sketch in form of an SVD of a distributed matrix.
        %   [U,S,V] = svdsketch(A)
        %   [U,S,V] = svdsketch(A, tol)
        %   [U,S,V] = svdsketch(A, tol, Name, Value)
        %   
        %   See also SVDS, EIGS, DISTRIBUTED, DISTRIBUTED/SVDS, DISTRIBUTED/EIGS.

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

        function [varargout] = swapbytes( varargin )
        %SWAPBYTES Swap byte ordering, changing endianness of distributed array
        %   Y = SWAPBYTES(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.ones(N,'uint16');
        %       E = swapbytes(D)
        %       classD = underlyingType(D)
        %       classE = underlyingType(E)
        %   
        %   swaps the bytes of the uint16(1) values of D into uint16(256).
        %   classD and classE are both uint16.
        %   
        %   See also SWAPBYTES, DISTRIBUTED, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = symmlq( varargin )
        %SYMMLQ   Symmetric LQ Method for distributed array.
        %   X = SYMMLQ(A,B)
        %   X = SYMMLQ(A,B)
        %   X = SYMMLQ(A,B,TOL)
        %   X = SYMMLQ(A,B,TOL,MAXIT)
        %   X = SYMMLQ(A,B,TOL,MAXIT,M)
        %   X = SYMMLQ(A,B,TOL,MAXIT,M1,M2)
        %   X = SYMMLQ(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = SYMMLQ(A,B,...)
        %   [X,FLAG,RELRES] = SYMMLQ(A,B,...)
        %   [X,FLAG,RELRES,ITER] = SYMMLQ(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = SYMMLQ(A,B,...)
        %      
        %   Note that B must be a non-sparse column vector.
        %   
        %   Limitations:
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using SYMMLQ to solve a large system of distributed array data:
        %       n = 100; 
        %       dOnes = distributed.ones(n, 1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -2*dOnes], -1:1, n, n);
        %       db = full(sum(A, 2)); 
        %       tol = 1e-10; 
        %       maxit = 50;
        %       dM = spdiags(4*dOnes, 0, n, n); 
        %       
        %       dX = SYMMLQ(dA, db, tol, maxit, dM);
        %   
        %   See also SYMMLQ, DISTRIBUTED, ONES, SPDIAGS, SUM.

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

        function [varargout] = table2array( varargin )
        %TABLE2ARRAY Convert distributed table to a homogeneous array.
        %   A = TABLE2ARRAY(T)
        %   
        %   See also TABLE2ARRAY, DISTRIBUTED.
        %   

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

        function [varargout] = table2cell( varargin )
        %TABLE2CELL Convert distributed table to cell array.
        %   C = TABLE2CELL(T)
        %   
        %   See also TABLE2CELL, DISTRIBUTED.
        %   

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

        function [varargout] = table2timetable( varargin )
        %TABLE2TIMETABLE Convert distributed table to distributed timetable.
        %   TT = TABLE2TIMETABLE(T)
        %   TT = TABLE2TIMETABLE(T,'RowTimes',TIMEVARNAME)
        %   TT = TABLE2TIMETABLE(T,'RowTimes',ROWTIMES)
        %   
        %   Limitations:
        %   The parameters 'SampleRate', 'TimeStep', and 'StartTime' are not
        %   supported.
        %   
        %   See also TABLE2TIMETABLE, distributed.
        %   

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

        function [varargout] = tan( varargin )
        %TAN Tangent of distributed array in radians
        %   Y = TAN(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = pi/4*distributed.ones(N);
        %       E = tan(D)
        %   
        %   See also TAN, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = tand( varargin )
        %TAND Tangent of distributed array in degrees
        %   Y = TAND(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = 45*distributed.ones(N);
        %       E = tand(D)
        %   
        %   See also TAND, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = tanh( varargin )
        %TANH Hyperbolic tangent of distributed array
        %   Y = TANH(X)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.inf(N);
        %       E = tanh(D)
        %   
        %   See also TANH, DISTRIBUTED, DISTRIBUTED/INF.

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

        function [varargout] = tensorprod( varargin )
        %TENSORPROD Tensor products between two distributed tensors.
        %   C = TENSORPROD(A, B)
        %   C = TENSORPROD(A, B, "ALL")
        %   C = TENSORPROD(A, B, DIM)
        %   C = TENSORPROD(A, B, DIMA, DIMB)
        %   C = TENSORPROD(..., NUMDIMENSIONSA = NDIMSA)
        %   
        %   See also TENSORPROD, DISTRIBUTED.
        %   

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

        function [varargout] = tfqmr( varargin )
        %TFQMR   Transpose Free Quasi-Minimal Residual Method for distributed array.
        %   X = TFQMR(A,B)
        %   X = TFQMR(A,B)
        %   X = TFQMR(A,B,TOL)
        %   X = TFQMR(A,B,TOL,MAXIT)
        %   X = TFQMR(A,B,TOL,MAXIT,M)
        %   X = TFQMR(A,B,TOL,MAXIT,M1,M2)
        %   X = TFQMR(A,B,TOL,MAXIT,M1,M2,X0)
        %   [X,FLAG] = TFQMR(A,B,...)
        %   [X,FLAG,RELRES] = TFQMR(A,B,...)
        %   [X,FLAG,RELRES,ITER] = TFQMR(A,B,...)
        %   [X,FLAG,RELRES,ITER,RESVEC] = TFQMR(A,B,...)
        %      
        %   If M1 is a function it is applied independently to each row.
        %   
        %   Example:
        %   Using TFQMR to solve a large system of distributed array data:
        %       n = 1e6; 
        %       dOnes = distributed.ones(n,1); 
        %       dA = spdiags([-2*dOnes 4*dOnes -dOnes],-1:1,n,n);
        %       db = sum(dA,2);
        %       tol = 1e-8; 
        %       maxit = 15; 
        %       
        %       dX = TFQMR(dA,db,tol,maxit)
        %   
        %   See also TFQMR, DISTRIBUTED.

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

        function [varargout] = time( varargin )
        %TIME Extract the time portion of calendar durations.
        %   
        %   T = TIME(D)
        %    
        %   See also TIME, distributed.
        %   

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

        function [varargout] = timeofday( varargin )
        %TIMEOFDAY Elapsed time since midnight for distributed datetimes.
        %   
        %   D = TIMEOFDAY(T)
        %   [D,DATE] = TIMEOFDAY(T)
        %   
        %   See also DATETIME/TIMEOFDAY, DISTRIBUTED.
        %   

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

        function [varargout] = times( varargin )
        %.* distributed array multiply
        %   C = A .* B
        %   C = TIMES(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.eye(N);
        %       D2 = distributed.rand(N);
        %       D3 = D1 .* D2
        %   
        %   See also TIMES, DISTRIBUTED, DISTRIBUTED/EYE.

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

        function [varargout] = timetable2table( varargin )
        %TIMETABLE2TABLE Convert distributed timetable to distributed table.
        %   T = TABLE2TIMETABLE(TT)
        %   T = TABLE2TIMETABLE(TT,'ConvertRowTimes',TF)
        %   
        %   See also TIMETABLE2TABLE, distributed.
        %   

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

        function [varargout] = topkrows( varargin )
        %TOPKROWS Top rows in sorted order
        %   Y = TOPKROWS(X,K)
        %   Y = TOPKROWS(X,K,COL)
        %   Y = TOPKROWS(...,DIRECTION)
        %   Y = TOPKROWS(...,'ComparisonMethod',C)
        %   [Y,I] = TOPKROWS(...)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed(magic(N))
        %       m = topkrows(D,10)
        %       m1 = topkrows(D,10,10)
        %       m2 = topkrows(D,10,'ComparisonMethod','real')
        %   
        %   m, m1 and m2 are a set of K distributed row vectors.
        %   
        %   See also TOPKROWS, DISTRIBUTED, MAGIC.
        %   

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

        function [varargout] = transpose( varargin )
        %.' Transpose of distributed array
        %   E = D.'
        %   E = TRANSPOSE(D)
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       E = D.'
        %   
        %   See also TRANSPOSE, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = trapz( varargin )
        %TRAPZ Trapezoidal numerical integration.
        %   Z = TRAPZ(Y)
        %   Z = TRAPZ(X,Y)
        %   Z = TRAPZ(...,DIM)
        %   
        %   Example:
        %       % Create a sine wave between 0 and pi
        %       X = distributed.linspace(0, pi, 10000);
        %       Y = sin(X);
        %       Z = trapz(X,Y);  % == 2.0
        %   
        %   See also TRAPZ, DISTRIBUTED, DISTRIBUTED/SUM, DISTRIBUTED/CUMSUM, CUMTRAPZ, INTEGRAL.

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

        function [varargout] = tril( varargin )
        %TRIL Extract lower triangular part of distributed array
        %   T = TRIL(A,K) yields the elements on and below the K-th diagonal of A. 
        %   K = 0 is the main diagonal, K > 0 is above the main diagonal and K < 0
        %   is below the main diagonal.
        %   T = TRIL(A) is the same as T = TRIL(A,0) where T is the lower triangular 
        %   part of A.
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       T1 = tril(D,1)
        %       Tm1 = tril(D,-1)
        %   
        %   See also TRIL, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = triu( varargin )
        %TRIU Extract upper triangular part of distributed array
        %   T = TRIU(A,K) yields the elements on and above the K-th diagonal of A. 
        %   K = 0 is the main diagonal, K > 0 is above the main diagonal and K < 0
        %   is below the main diagonal.
        %   T = TRIU(A) is the same as T = TRIU(A,0) where T is the upper triangular 
        %   part of A.
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.rand(N);
        %       T1 = triu(D,1)
        %       Tm1 = triu(D,-1)
        %   
        %   See also TRIU, DISTRIBUTED, DISTRIBUTED/RAND.

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

        function [varargout] = typecast( varargin )
        %TYPECAST Convert datatypes of distributed array without changing underlying data
        %   Y = TYPECAST(X, DATATYPE)
        %   
        %   Example:
        %       N = 1000;
        %       Di = -1*distributed.ones(1,N,'int8');
        %       Du = typecast(Di,'uint8')
        %       classDi = underlyingType(Di)
        %       classDu = underlyingType(Du)
        %   
        %   type casts the 1-by-N distributed uint8 row vector Du to the
        %   distributed int8 array Di.
        %   Di has all values -1 while Du has all values 255.
        %   classDi is 'int8' while classDu is 'uint8'.
        %   
        %   See also TYPECAST, DISTRIBUTED, DISTRIBUTED/ONES, 
        %   DISTRIBUTED/underlyingType.
        %   

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

        function [varargout] = tzoffset( varargin )
        %TZOFFSET Time zone offset of datetimes.
        %   
        %   DT = TZOFFSET(T)
        %   [DT,DST] = TZOFFSET(T)
        %   
        %   See also TZOFFSET.
        %   

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

        function [varargout] = uint16( varargin )
        %UINT16 Convert distributed array to unsigned 16-bit integer
        %   I = UINT16(X)
        %   
        %   Example:
        %       N = 1000;
        %       Di = distributed.ones(N,'int16');
        %       Du = uint16(Di)
        %       classDi = underlyingType(Di)
        %       classDu = underlyingType(Du)
        %   
        %   converts the N-by-N int16 distributed array Di to the
        %   uint16 distributed array Du.
        %   classDi is 'int16' while classDu is 'uint16'.
        %   
        %   See also UINT16, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = uint32( varargin )
        %UINT32 Convert distributed array to unsigned 32-bit integer
        %   I = UINT32(X)
        %   
        %   Example:
        %       N = 1000;
        %       Di = distributed.ones(N,'int32');
        %       Du = uint32(Di)
        %       classDi = underlyingType(Di)
        %       classDu = underlyingType(Du)
        %   
        %   converts the N-by-N int32 distributed array Di to the
        %   uint32 distributed array Du.
        %   classDi is 'int32' while classDu is 'uint32'.
        %   
        %   See also UINT32, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = uint64( varargin )
        %UINT64 Convert distributed array to unsigned 64-bit integer
        %   I = UINT64(X)
        %   
        %   Example:
        %       N = 1000;
        %       Di = distributed.ones(N,'int64');
        %       Du = uint64(Di)
        %       classDi = underlyingType(Di)
        %       classDu = underlyingType(Du)
        %   
        %   converts the N-by-N int64 distributed array Di to the
        %   uint64 distributed array Du.
        %   classDi is 'int64' while classDu is 'uint64'.
        %   
        %   See also UINT64, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = uint8( varargin )
        %UINT8 Convert distributed array to unsigned 8-bit integer
        %   I = UINT8(X)
        %   
        %   Example:
        %       N = 1000;
        %       Di = distributed.ones(N,'int8');
        %       Du = uint8(Di)
        %       classDi = underlyingType(Di)
        %       classDu = underlyingType(Du)
        %   
        %   converts the N-by-N int8 distributed array Di to the
        %   uint8 distributed array Du.
        %   classDi is 'int8' while classDu is 'uint8'.
        %   
        %   See also UINT8, DISTRIBUTED, DISTRIBUTED/ONES.

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

        function [varargout] = uminus( varargin )
        %- Unary minus for distributed arrays
        %   B = -A
        %   B = UMINUS(A)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.eye(N);
        %       D2 = -D1
        %   
        %   See also UMINUS, DISTRIBUTED, DISTRIBUTED/EYE.

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

        function [varargout] = union( varargin )
        %UNION Set union for distributed array data.
        %   C = union(A,B)    
        %   [C,IA,IB] = union(A,B)    
        %   [C,IA,IB] = union(A,B,'rows')    
        %   [C,IA,IB] = union(A,B,'stable') 
        %   [C,IA,IB] = union(A,B,'rows','stable') 
        %   [C,IA,IB] = union(A,B,'sorted') 
        %   [C,IA,IB] = union(A,B,'rows','sorted') 
        %   
        %   Limitations:
        %   The 'legacy' flag is not supported.
        %   1. Table, timetable, categorical, datetime and duration inputs are not supported.
        %   2. Char and string inputs are not supported when A or B is a cell array of char vectors. Convert cell array of char vectors input arguments to string instead.
        %   
        %   See also union, distributed.

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

        function [varargout] = unique( varargin )
        %UNIQUE Set unique for distributed array data.
        %   C = UNIQUE(A)
        %   [C,IA,IC] = UNIQUE(A)
        %   [C,IA,IC] = UNIQUE(A,'rows')
        %   [C,IA,IC] = UNIQUE(A,OCCURRENCE)
        %   [C,IA,IC] = UNIQUE(A,'rows',OCCURRENCE)
        %   [C,IA,IC] = UNIQUE(A,'stable')
        %   [C,IA,IC] = UNIQUE(A,'rows','stable')
        %   
        %   Table and timetable inputs are not supported.
        %   
        %   See also UNIQUE, distributed.

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

        function [varargout] = unwrap( varargin )
        %UNWRAP Unwrap phase angle.
        %   Q = UNWRAP(P)
        %   Q = UNWRAP(P,TOL)
        %   Q = UNWRAP(P,[],DIM)
        %   Q = UNWRAP(P,TOL,DIM)
        %   
        %   Example:
        %       % Create a sawtooth phase signal wrapping from +pi to -pi
        %       noise = rand(1, 10000, 'distributed') - 0.5;
        %       P = repmat(distributed.linspace(-pi, pi, 1000), 1, 10) + noise;
        %   
        %       % Unwrap to retrieve linear trend
        %       Q = unwrap(P);
        %   
        %   See also UNWRAP, DISTRIBUTED, DISTRIBUTED/ANGLE, DISTRIBUTED/ABS.

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

        function [varargout] = uplus( varargin )
        %+ Unary plus for distributed array
        %   B = +A
        %   B = UPLUS(A)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.eye(N);
        %       D2 = +D1
        %   
        %   See also UPLUS, DISTRIBUTED, DISTRIBUTED/EYE.

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

        function [varargout] = upper( varargin )
        %UPPER Convert distributed array of strings to uppercase.
        %   B = UPPER(A)
        %   
        %   Note that A must be an array of strings or a cell array of char vectors.
        %   
        %   Example:
        %       a = { 'Hello',  'goodbye' };
        %       A = distributed(a)
        %       B = upper(A)
        %   
        %   See also UPPER, DISTRIBUTED/LOWER, DISTRIBUTED.
        %   
        %   

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

        function [varargout] = var( varargin )
        %VAR Variance.
        %   Y = VAR(X) or VAR(X,0)
        %   Y = VAR(X,1)
        %   Y = VAR(X,W)
        %   Y = VAR(X,W,DIM)
        %   Y = VAR(...,NANFLAG)
        %   [Y,M] = VAR(X,...)
        %   
        %   Example:
        %       Nrow = 50;
        %       Ncol = 100; 
        %       X = distributed.rand(Nrow, Ncol);
        %       W1 = distributed.rand(1, Ncol);
        %       Y1 = var(X,W1,2); % Returns a 50 by 1 vector
        %       W2 = distributed.rand(Nrow, 1); 
        %       Y2 = var(X,W2,1); % Returns a 1 by 100 vector
        %   
        %   X and Y must be single or double arrays. Both real and complex types are supported.
        %   
        %   See also VAR, DISTRIBUTED, MEAN, STD, COV, DISTRIBUTED/CORRCOEF.
        %   

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

        function [varargout] = vecnorm( varargin )
        %VECNORM   Vector norm.
        %   N = VECNORM(A)
        %   N = VECNORM(A,p)
        %   N = VECNORM(A,p,DIM) 
        %   
        %   Example:
        %   
        %       % Find the 2-norm along the columns and rows of a matrix
        %       A = distributed([0 1 2; 3 4 5])
        %       c = vecnorm(A)
        %       r = vecnorm(A,2,2)
        %   
        %   See also NORM, distributed.

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

        function [varargout] = vertcat( varargin )
        %VERTCAT Vertical concatenation for distributed array
        %   C = VERTCAT(A,B,...) implements [A; B; ...] for distributed arrays.
        %   
        %   Example:
        %       N = 1000;
        %       D = distributed.eye(N);
        %       D2 = [D; D] % a 2000-by-1000 distributed matrix
        %   
        %   See also VERTCAT, DISTRIBUTED, DISTRIBUTED/CAT.

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

        function [varargout] = week( varargin )
        %WEEK Week numbers of datetimes.
        %   
        %   W = WEEK(T)
        %   W = WEEK(T,KIND)
        %   
        %   See also WEEK.
        %   

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

        function [varargout] = xor( varargin )
        %XOR Logical EXCLUSIVE OR for distributed array
        %   C = XOR(A,B)
        %   
        %   Example:
        %       N = 1000;
        %       D1 = distributed.eye(N);
        %       D2 = distributed.rand(N);
        %       D3 = xor(D1,D2)
        %   
        %   See also XOR, DISTRIBUTED, DISTRIBUTED/EYE.
        %   

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

        function [varargout] = year( varargin )
        %YEAR Year numbers of datetimes.
        %   
        %   Y = YEAR(T)
        %   Y = YEAR(T,KIND)
        %   
        %   See also YEAR.
        %   

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

        function [varargout] = years( varargin )
        %YEARS Create durations from numeric values in units of standard-length years.
        %   
        %   Y = YEARS(N)
        %    
        %   See also YEARS, distributed.
        %   

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

        function [varargout] = ymd( varargin )
        %YMD Year, month, and day numbers of datetimes.
        %   
        %   [Y,M,D] = YMD(T)
        %   
        %   See also YMD.
        %   

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

        function [varargout] = yyyymmdd( varargin )
        %YYYYMMDD Convert MATLAB datetimes to yyyymmdd numeric values.
        %   
        %   Y = YYYYMMDD(T)
        %   
        %   See also YYYYMMDD.
        %   

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

    end % generated public methods

    methods (Access = public, Hidden)
        function [varargout] = createArrayLike( varargin )
        %createArrayLike  create a distributed array
        %   
        %   See also createArray, DISTRIBUTED.

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

        function [varargout] = onesLike( varargin )
        %ONESLIKE onesLike distributed array 
        %   
        %   When P is of type distributed array:
        %   D = ONESLIKE(P,N) is an N-by-N distributed matrix of ones with the same
        %   complexity and underlying class as P. This is equivalent to 
        %   D = ONES(N,'like',P)
        %   
        %   D = ONESLIKE(P, M,N,..., CLASSNAME) or 
        %   ONESLIKE(P, [M,N,...], CLASSNAME) is the M-by-N-by-...
        %   distributed of ones of underlying class specified by CLASSNAME with 
        %   the same complexity as P. This is equivalent to 
        %   D = ONES([M,N,...],CLASSNAME,'like',P)
        %   
        %   P must be of numeric underlying class.
        %   
        %   See also ONES, DISTRIBUTED, DISTRIBUTED/ones.

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

        function [varargout] = zerosLike( varargin )
        %ZEROSLIKE zerosLike distributed array
        %   
        %   When P is of type distributed array:
        %   D = ZEROSLIKE(P,N) is an N-by-N distributed matrix of zeros with the same 
        %   complexity and underlying class as P. This is equivalent to 
        %   D = ZEROS(N,'like',P)
        %   
        %   D = ZEROSLIKE(P, M,N,..., CLASSNAME) or 
        %   ZEROSLIKE(P, [M,N,...], CLASSNAME) is an M-by-N-by-... 
        %   distributed array of zeros of underlying class specified by CLASSNAME with 
        %   the same complexity as P. This is equivalent to 
        %   D = ZEROS([M,N,...],CLASSNAME,'like',P)
        %   
        %   P must be of numeric underlying class.
        %   
        %   See also ZEROS, DISTRIBUTED, DISTRIBUTED/zeros.

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

        function [varargout] = trueLike( varargin )
        %TRUELIKE True distributed array matrix
        %   
        %   When P is of type distributed array:
        %   D = TRUELIKE(P,N) is an N-by-N distributed matrix of logical ones.
        %   This is equivalent to 
        %   D = TRUE(N,'like',P)
        %   P must be of logical underlying class.
        %   
        %   See also TRUE, DISTRIBUTED, DISTRIBUTED/true.

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

        function [varargout] = falseLike( varargin )
        %FALSELIKE False distributed array matrix
        %   
        %   When P is of type distributed array:
        %   D = FALSELIKE(P,N) is an N-by-N distributed matrix of logical zeros.
        %   This is equivalent to 
        %   D = FALSE(N,'like',P)
        %   P must be of logical underlying class.
        %   
        %   See also FALSE, DISTRIBUTED, DISTRIBUTED/false.

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

        function [varargout] = epsLike( varargin )
        %EPSLIKE epsLike distributed array
        %   
        %   D = EPSLIKE(P) is a distributed scalar with the value of eps for the
        %   underlyingType of P and matching all other attributes.
        %   
        %   P must be of floating-point underlying class.
        %   
        %   See also EPS, DISTRIBUTED.

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

        function [varargout] = eyeLike( varargin )
        %EYELIKE Identity distributed array matrix
        %   
        %   When P is of type distributed array:
        %   D = EYELIKE(P,N) is an N-by-N distributed matrix with ones on
        %   the diagonal and zeros elsewhere, and the same complexity and
        %   underlying class as P. This is equivalent to 
        %   D = EYE(N,'like',P)
        %   
        %   D = EYELIKE(P,M,N, CLASSNAME) or 
        %   EYELIKE(P, [M,N], CLASSNAME) is the M-by-N 
        %   distributed identity matrix with underlying data of class CLASSNAME 
        %   and the same complexity as P. This is equivalent to 
        %   D = EYE([M,N],CLASSNAME,'like',P)
        %   
        %   P must be of numeric underlying class.
        %   
        %   See also EYE, DISTRIBUTED, DISTRIBUTED/eye.

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

        function [varargout] = flintmaxLike( varargin )
        %FLINTMAXLIKE flintmaxLike distributed array
        %   
        %   D = FLINTMAXLIKE(P) is a distributed scalar with the value of flintmax for the
        %   underlyingType of P and matching all other attributes.
        %   
        %   P must have floating-point underlying type.
        %   
        %   See also FLINTMAX, DISTRIBUTED.

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

        function [varargout] = infLike( varargin )
        %INFLIKE Infinity distributed array matrix
        %   
        %   When P is of type distributed array:
        %   D = INFLIKE(P,N) is an N-by-N distributed matrix of INFs with
        %   the same complexity and underlying class as P.
        %   This is equivalent to 
        %   D = INF(N,'like',P)
        %   
        %   D = INFLIKE(P, M,N,..., CLASSNAME) or 
        %   INFLIKE(P, [M,N,...], CLASSNAME) is the M-by-N-by-...
        %   distributed matrix of INFs with underlying data of class CLASSNAME 
        %   and the same complexity as P. This is equivalent to 
        %   D = INF([M,N,...],CLASSNAME,'like',P)
        %   
        %   P must have underlying class 'single' or 'double'.
        %   
        %   See also INF, DISTRIBUTED, DISTRIBUTED/inf.

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

        function [varargout] = intmaxLike( varargin )
        %INTMAXLIKE intmaxLike distributed array
        %   
        %   D = intmaxLike(P) is a distributed scalar with the value of intmax for the
        %   underlyingType of P and matching all other attributes.
        %   
        %   P must have integer underlying type.
        %   
        %   See also INTMAX, DISTRIBUTED.

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

        function [varargout] = intminLike( varargin )
        %INTMINLIKE intminLike distributed array
        %   
        %   D = intminLike(P) is a distributed scalar with the value of intmin for the
        %   underlyingType of P and matching all other attributes.
        %   
        %   P must have integer underlying type.
        %   
        %   See also INTMIN, DISTRIBUTED.

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

        function [varargout] = nanLike( varargin )
        %NANLIKE Build distributed array containing Not-a-number
        %   
        %   When P is of type distributed array:
        %   D = NANLIKE(P,N) is an N-by-N distributed matrix of NANs
        %   with the same complexity and underlying class as P. 
        %   This is equivalent to 
        %   D = NAN(N,'like',P)
        %   
        %   D = NANLIKE(P,M,N,..., CLASSNAME) or 
        %   NANLIKE(P, [M,N,...], CLASSNAME) is an M-by-N-by-...
        %   distributed matrix of NANs of class CLASSNAME and the same complexity as 
        %   P. CLASSNAME must be either 'single' or 'double'. This is equivalent to 
        %   D = NAN[M,N,...],CLASSNAME,'like',P)
        %   
        %   P must have underlying class 'single' or 'double'.
        %   
        %   See also NAN, DISTRIBUTED, DISTRIBUTED/nan.

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

        function [varargout] = randLike( varargin )
        %RANDLIKE randLike distributed array 
        %   
        %   When P is of type distributed array:
        %   D = RANDLIKE(P,N) is an N-by-N distributed matrix of psuedo-random values with
        %   the same underlying class as P. This is equivalent to 
        %   D = RAND(N,'like',P)
        %   
        %   P must be of numeric underlying class.
        %   
        %   See also RAND, DISTRIBUTED, DISTRIBUTED/rand.

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

        function [varargout] = randiLike( varargin )
        %RANDILIKE randiLike distributed array 
        %   
        %   When P is of type distributed array:
        %   D = RANDILIKE(P,N) is an N-by-N distributed matrix of psuedo-random integer
        %   values with the same underlying class as P. This is equivalent to 
        %   D = RANDI(N,'like',P)
        %   
        %   P must be of numeric underlying class.
        %   
        %   See also RANDI, DISTRIBUTED, DISTRIBUTED/randi.

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

        function [varargout] = randnLike( varargin )
        %RANDNLIKE randnLike distributed array 
        %   
        %   When P is of type distributed array:
        %   D = RANDNLIKE(P,N) is an N-by-N distributed matrix of normally ditributed 
        %   psuedo-random values with the same underlying class as P. This is 
        %   equivalent to D = RANDN(N,'like',P)
        %   
        %   P must be of numeric underlying class.
        %   
        %   See also RANDN, DISTRIBUTED, DISTRIBUTED/randn.

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

        function [varargout] = realmaxLike( varargin )
        %REALMAXLIKE realmaxLike distributed array
        %   
        %   D = realmaxLike(P) is a distributed scalar with the value of realmax for the
        %   underlyingType of P and matching all other attributes.
        %   
        %   P must have floating-point underlying type.
        %   
        %   See also REALMAX, DISTRIBUTED.

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

        function [varargout] = realminLike( varargin )
        %REALMINLIKE realminLike distributed array
        %   
        %   D = realminLike(P) is a distributed scalar with the value of realmin for the
        %   underlyingType of P and matching all other attributes.
        %   
        %   P must have floating-point underlying type.
        %   
        %   See also REALMIN, DISTRIBUTED.

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

        function [varargout] = isaUnderlying( varargin )
        %isaUnderlying    True if the DISTRIBUTED array's underlying elements are a given class
        %   TF = isaUnderlying(D, 'classname') returns true if the elements of D are 
        %   either an instance of 'classname' or an instance of a class derived from 
        %   'classname'.  isaUnderlying and ISA support the same values for 'classname'. 
        %   
        %   Example:   
        %       N = 1000;
        %       D_uint8   = distributed.ones(1, N, 'uint8');
        %       D_cell    = distributed.cell(1, N);
        %       isUint8   = isaUnderlying(D_uint8, 'uint8')   % returns true
        %       isInteger = isaUnderlying(D_uint8, 'integer') % returns true
        %       isFloat   = isaUnderlying(D_uint8, 'float')   % returns false
        %       isDouble  = isaUnderlying(D_cell, 'double')   % returns false
        %   
        %   See also ISA, DISTRIBUTED, DISTRIBUTED/underlyingType, DISTRIBUTED/CELL, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = colonize( varargin )
        %COLONIZE Implement A(:) for distributed A
        %   B = COLONIZE(A) implements B = A(:)
        %   
        %   Example:
        %       N = 1000;
        %       A = distributed.ones(N);
        %       B = colonize(A) % B is now a 1000000-by-1 vector of ones
        %   
        %   See also COLONIZE, DISTRIBUTED, DISTRIBUTED/ONES.
        %   

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

        function [varargout] = condest( varargin )
        %CONDEST 1-norm condition number estimate for distributed array.
        %   CONDEST for distributed array is not supported.

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

        function [varargout] = lengthenVar( varargin )
        %FOR INTERNAL USE ONLY -- This feature is intentionally undocumented.
        %   Its behavior may change, or it may be removed in a future release.
        %   

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

        function [varargout] = keyHash( varargin )
        %keyHash Generates a hash code
        %   keyHash for distributed array is not supported.

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

        function [varargout] = keyMatch( varargin )
        %keyMatch True if two keys are the same.
        %   keyMatch for distributed array is not supported.

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

        function [varargout] = mpower( varargin )
        %^   Matrix power of distributed array
        %   C = A^b
        %   C = MPOWER(A,b)
        %   Either A or b (but not both) may be a matrix.  The other input must be scalar.
        %   
        %   Example:
        %       A = rand(1000, 'distributed');
        %       C = A^1.3;
        %    
        %   See also MPOWER, DISTRIBUTED.

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

        function [varargout] = sprintf( varargin )
        %SPRINTF overloaded for distributed arrays
        %   SPRINTF is not supported for distributed array inputs.
        %   
        %   See also SPRINTF, DISTRIBUTED.
        %   

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

        function [varargout] = hTimesTranspose( varargin )
        %HTIMESTRANSPOSE matrix multiply with transposed inputs
        %   
        %   HTIMESTRANSPOSE(A, transA, B, transB) performs a matrix-matrix multiply
        %   of A and B applying transposes to A and B as appropriate. The two transpose
        %   flags can have the following values:
        %      0  No transpose
        %      1  Non-conjugate transpose
        %      2  Conjugate transpose
        %   
        %   Example:
        %       A = distributed([ 1 2 3; 4 5 6 ]);
        %       B = distributed([ 7 8 9; 10 11 12 ]);
        %       C = hTimesTranspose(A, 0, B, 1); % C is 2x2 
        %   
        %   See also: distributed/mtimes, distributed/transpose, distributed/ctranspose, distributed.
        %   

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

        function [varargout] = hMldivideTranspose( varargin )
        %HMLDIVIDETRANSPOSE matrix left-division with transposed inputs
        %   
        %   HMLDIVIDETRANSPOSE(A, transA, B, transB) performs a matrix left-division
        %   of A and B applying transposes to A and B as appropriate. The two transpose
        %   flags can have the following values:
        %      0  No transpose
        %      1  Non-conjugate transpose
        %      2  Conjugate transpose
        %   
        %   Example:
        %       A = distributed([ 1 2; 3 4; 5 6 ]);
        %       B = distributed([ 7 8 9; 10 11 12 ]);
        %       C = hMldivideTranspose(A, 0, B, 1); % C is 3x2 
        %   
        %   See also: distributed/mldivide, distributed/transpose, distributed/ctranspose, distributed.
        %   

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

        function [varargout] = hMldivideAndMrdivide( varargin )
        %hMldivideAndMrdivide is a common implementation of mldivide and mrdivide
        %   for (co)distributed matrices. Optional second output is reciprocal
        %   condition number (rCond).
        %   

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

        function [varargout] = hIsDiagonallyDominant( varargin )
        %Check if a matrix is diagonally-dominant
        %   

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

        function [varargout] = hIsPermutedTriangular( varargin )
        %Check if matrix is permuted triangular and return permutations
        %   

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

    end % generated public, hidden methods

    methods (Access = private)
        varargout = dispInternal( varargin );
        varargout = gatherIfNecessary( varargin );
        varargout = transferPortion( varargin );
    end % private methods

    methods (Access = private, Static)
        varargout = sBuild( varargin );
        varargout = sBuildArgChk( varargin );
    end % static private methods

    % Static method declarations
    methods (Access = public, Static, Hidden)
        D = empty( varargin );
        function D = inf(varargin)
            D = distributed.sBuild( @codistributed.inf, 'inf', varargin{:} );
        end
        function D = nan(varargin)
            D = distributed.sBuild( @codistributed.nan, 'nan', varargin{:} );
        end
    end
    
    methods (Access = public, Static)
        % Methods taking only size-type arguments:
        D = true( varargin );
        D = false( varargin );
        
        % Cell
        D = cell( varargin );
        
        % Methods taking size and optional class
        D = ones( varargin );
        D = zeros( varargin );
        D = eye( varargin );
        D = Inf( varargin );
        D = NaN( varargin );
        D = rand( varargin );
        D = randi( varargin );
        D = randn( varargin );

        % Unique prototype methods       
        D = colon( varargin );
        D = linspace( varargin );
        D = logspace( varargin );
        
        % Sparse-related methods
        D = speye( varargin );
        D = sprand( varargin );
        D = sprandn( varargin );
        D = sprandsym( varargin );
        D = spalloc( varargin );
    end
end
