function D = rand(varargin)
%RAND codistributed array of uniformly distributed pseudorandom numbers using codistributor
%   D = RAND(..., CODISTR) and D = RAND(..., CODISTR, ...) where CODISTR is a 1D
%   codistributor, are equivalent to calling CODISTRIBUTED.RAND with the same
%   input arguments.
%
%   Example:
%     Create a 1000-by-1000 codistributed array of pseudo-random numbers:
%     spmd
%         D = rand(1000, codistributor('1d'));
%     end
% 
%   See also RAND, CODISTRIBUTED/RAND, CODISTRIBUTOR1D


%   Copyright 2006-2013 The MathWorks, Inc.

[randFcn, inputArgs] = distributedutil.CodistParser.parseCodistributorBuildFcns(...
    'rand', @codistributed.rand, @randLike, varargin);

try
    D = randFcn(inputArgs{:});
catch E
    throw(E);
end

end % End of rand.
