RANDOM Generate random arrays from a specified distribution.
R = RANDOM(NAME,A) returns an array of random numbers chosen from the
one-parameter probability distribution specified by NAME with parameter
values A.
R = RANDOM(NAME,A,B) or R = RANDOM(NAME,A,B,C) returns an array of random
numbers chosen from a two- or three-parameter probability distribution
with parameter values A, B (and C).
The size of R is the common size of the input arguments. A scalar input
functions as a constant matrix of the same size as the other inputs.
R = RANDOM(NAME,A,M,N,...) or R = RANDOM(NAME,A,[M,N,...]) returns an
M-by-N-by-... array of random numbers for a one-parameter distribution.
Similarly, R = RANDOM(NAME,A,B,M,N,...) or R = RANDOM(NAME,A,B,[M,N,...]),
and R = RANDOM(NAME,A,B,C,M,N,...) or R = RANDOM(NAME,A,B,C,[M,N,...]),
return an M-by-N-by-... array of random numbers for a two- or
three-parameter distribution.
NAME can be:
'beta' or 'Beta',
'bino' or 'Binomial',
'burr' or 'Burr',
'chi2' or 'Chisquare',
'exp' or 'Exponential',
'ev' or 'Extreme Value',
'f' or 'F',
'gam' or 'Gamma',
'gev' or 'Generalized Extreme Value',
'gp' or 'Generalized Pareto',
'geo' or 'Geometric',
'hn' or 'Half Normal',
'hyge' or 'Hypergeometric',
'logn' or 'Lognormal',
'nbin' or 'Negative Binomial',
'ncf' or 'Noncentral F',
'nct' or 'Noncentral t',
'ncx2' or 'Noncentral Chi-square',
'norm' or 'Normal',
'poiss' or 'Poisson',
'rayl' or 'Rayleigh',
'stable'or 'Stable',
't' or 'T',
'unif' or 'Uniform',
'unid' or 'Discrete Uniform',
'wbl' or 'Weibull'.
Partial matches are allowed and case is ignored.
RANDOM is a generic function that accepts a distribution by name. It is
faster to use a more specialized function when possible, such as RANDN
or NORMRND for the normal distribution.
See also CDF, ICDF, MLE, PDF.
Documentation for random
doc stats/prob.NormalDistribution/random
Other uses of random
classreg.regr.CompactGeneralizedLinearModel/random
classreg.regr.CompactLinearModel/random
GeneralizedLinearMixedModel/random
gmdistribution/random
LeastSquaresResults/random
LinearMixedModel/random
MultinomialRegression/random
NLMEResults/random
NonLinearModel/random
piecewisedistribution/random
prob.NormalDistribution/random
prob.ProbabilityDistribution/random
prob.UnivariateDistribution/random
RepeatedMeasuresModel/random