Statistics Toolbox    
random

Random numbers from a specified distribution

Syntax

Description

y = random('name',A1,A2,A3,m,n) returns a matrix of random numbers, where 'name' is a string containing the name of the distribution, and A1, A2, and A3 are matrices of distribution parameters. Depending on the distribution some of the parameters may not be necessary.

Vector or matrix inputs must all have the same size. A scalar input is expanded to a constant matrix with the same dimensions as the other inputs.

The last two parameters, d and e, are the size of the matrix y. If the distribution parameters are matrices, then these parameters are optional, but they must match the size of the other matrix arguments (see second example).

random is a utility routine allowing you to access all the random number generators in the Statistics Toolbox using the name of the distribution as a parameter. See Overview of the Distributions for the list of available distributions.

Examples

See Also

betarnd, binornd, cdf, chi2rnd, exprnd, frnd, gamrnd, geornd, hygernd, icdf, lognrnd, nbinrnd, ncfrnd, nctrnd, ncx2rnd, normrnd, pdf, poissrnd, raylrnd, trnd, unidrnd, unifrnd, weibrnd


  qqplot randtool