Contents Previous Next Subchapters

Generating Random Numbers with Uniform Distribution
Syntax unirnd(minmaxrowscols)
See Also normrnd , exprnd , seed , snormal , randperm

Description
Returns a real or double matrix containing random elements that are uniformly distributed between min and max, where rows is the number of rows and cols is the number of columns. The arguments rows and cols are integer scalars. If the arguments min and max are double-precision scalars then the matrix returned is double, otherwise the return value is real.