Categories &

Functions List

Function Reference: unifrnd

statistics: r = unifrnd (a, b)
statistics: r = unifrnd (a, b, rows)
statistics: r = unifrnd (a, b, rows, cols, …)
statistics: r = unifrnd (a, b, [sz])

Random arrays from the continuous uniform distribution.

r = unifrnd (a, b) returns an array of random numbers chosen from the continuous uniform distribution with parameters a and b, which define the lower and upper bounds of the interval [a, b]. The size of r is the common size of a and b. A scalar input functions as a constant matrix of the same size as the other inputs.

When called with a single size argument, unifrnd returns a square matrix with the dimension specified. When called with more than one scalar argument, the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The size may also be specified with a row vector of dimensions, sz.

Further information about the continuous uniform distribution can be found at https://en.wikipedia.org/wiki/Continuous_uniform_distribution

See also: unifcdf, unifinv, unifpdf, unifit, unifstat

Source Code: unifrnd