function D = randi(varargin)
%RANDI codistributed array of normally distributed pseudorandom numbers using codistributor
%   D = RANDI(..., CODISTR) and D = RANDI(..., CODISTR, ...) where CODISTR is a
%   2D block-cyclic codistributor, are equivalent to calling CODISTRIBUTED.RANDN
%   with the same input arguments.
%
%   Example:
%     Create a 1000-by-1000 codistributed array of pseudo-random numbers:
%     spmd
%         D = randi([1 100], 1000, codistributor('2dbc'));
%     end
% 
%   See also RANDI, CODISTRIBUTED/RANDI, CODISTRIBUTOR2DBC

%   Copyright 2009-2013 The MathWorks, Inc.

[randiFcn, inputArgs] = distributedutil.CodistParser.parseCodistributorBuildFcns(...
    'randi', @codistributed.randi, @randiLike, varargin);

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

end % End of randi.
