Statistics Toolbox    
unifrnd

Random numbers from the continuous uniform distribution

Syntax

Description

R = unifrnd(A,B) generates uniform random numbers with parameters A and B. Vector or matrix inputs for A and B must have the same size, which is also the size of R. A scalar input for A or B is expanded to a constant matrix with the same dimensions as the other input.

R = unifrnd(A,B,m) generates uniform random numbers with parameters A and B, where m is a 1-by-2 vector that contains the row and column dimensions of R.

R = unifrnd(A,B,m,n) generates uniform random numbers with parameters A and B, where scalars m and n are the row and column dimensions of R.

Examples

See Also

unifcdf, unifinv, unifpdf, unifstat


  unifpdf unifstat