Function Reference: random

statistics: r = random (name, A)
statistics: r = random (name, A, B)
statistics: r = random (name, A, B, C)
statistics: r = random (name, …, rows, cols)
statistics: r = random (name, …, rows, cols, …)
statistics: r = random (name, …, [sz])

Random arrays from a given one-, two-, or three-parameter distribution.

The variable name must be a string with the name of the distribution to sample from. If this distribution is a one-parameter distribution, A must be supplied, if it is a two-parameter distribution, B must also be supplied, and if it is a three-parameter distribution, C must also be supplied. Any arguments following the distribution parameters will determine the size of the result.

When called with a single size argument, return 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 vector of dimensions sz.

name must be a char string of the name or the abbreviation of the desired probability distribution function as listed in the followng table. The last column shows the required number of parameters that must be passed passed to the desired *rnd distribution function.

Distribution NameAbbreviationInput Parameters
"Beta""beta"2
"Binomial""bino"2
"Birnbaum-Saunders""bisa"2
"Burr""burr"3
"Cauchy""cauchy"2
"Chi-squared""chi2"1
"Extreme Value""ev"2
"Exponential""exp"1
"F-Distribution""f"2
"Gamma""gam"2
"Geometric""geo"1
"Generalized Extreme Value""gev"3
"Generalized Pareto""gp"3
"Gumbel""gumbel"2
"Half-normal""hn"2
"Hypergeometric""hyge"3
"Inverse Gaussian""invg"2
"Laplace""laplace"2
"Logistic""logi"2
"Log-Logistic""logl"2
"Lognormal""logn"2
"Nakagami""naka"2
"Negative Binomial""nbin"2
"Noncentral F-Distribution""ncf"3
"Noncentral Student T""nct"2
"Noncentral Chi-Squared""ncx2"2
"Normal""norm"2
"Poisson""poiss"1
"Rayleigh""rayl"1
"Rician""rice"2
"Student T""t"1
"location-scale T""tls"3
"Triangular""tri"3
"Discrete Uniform""unid"1
"Uniform""unif"2
"Von Mises""vm"2
"Weibull""wbl"2

See also: cdf, icdf, pdf, betarnd, binornd, bisarnd, burrrnd, cauchyrnd, chi2rnd, evrnd, exprnd, frnd, gamrnd, geornd, gevrnd, gprnd, gumbelrnd, hnrnd, hygernd, invgrnd, laplacernd, logirnd, loglrnd, lognrnd, nakarnd, nbinrnd, ncfrnd, nctrnd, ncx2rnd, normrnd, poissrnd, raylrnd, ricernd, trnd, tlsrnd, trirnd, unidrnd, unifrnd, vmrnd, wblrnd

Source Code: random