Generates pseudo-random numbers from a given one-, two-, or three-parameter distribution.
The variable name must be a string that names the distribution from which to sample. If this distribution is a one-parameter distribution arg1 should be supplied, if it is a two-paramter distribution arg2 must also be supplied, and if it is a three-parameter distribution arg3 must also be present. Any arguments following the distribution paramters will determine the size of the result.
As an example, the following code generates a 10 by 20 matrix containing random numbers from a normal distribution with mean 5 and standard deviation 2.
R = random("normal", 5, 2, [10, 20]);
The variable name can be one of the following strings
Samples are drawn from the Beta distribution.
Samples are drawn from the Binomial distribution.
Samples are drawn from the Chi-Square distribution.
Samples are drawn from the Exponential distribution.
Samples are drawn from the F distribution.
Samples are drawn from the Gamma distribution.
Samples are drawn from the Geometric distribution.
Samples are drawn from the Hypergeometric distribution.
Samples are drawn from the Log-Normal distribution.
Samples are drawn from the Negative Binomial distribution.
Samples are drawn from the Normal distribution.
Samples are drawn from the Poisson distribution.
Samples are drawn from the Rayleigh distribution.
Samples are drawn from the T distribution.
Samples are drawn from the Uniform distribution.
Samples are drawn from the Uniform Discrete distribution.
Samples are drawn from the Weibull distribution.
See also: rand, betarnd, binornd, chi2rnd, exprnd, frnd, gamrnd, geornd, hygernd, lognrnd, nbinrnd, normrnd, poissrnd, raylrnd, trnd, unifrnd, unidrnd, wblrnd.
Package: statistics