This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Weibull random numbers


R = wblrnd(A,B)
R = wblrnd(A,B,m,n,...)
R = wblrnd(A,B,[m,n,...])


R = wblrnd(A,B) generates random numbers for the Weibull distribution with scale parameter, A and shape parameter, B. The input arguments A and B can be either scalars or matrices. A and B, can be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input is expanded to a constant array of the same size as the other input.

R = wblrnd(A,B,m,n,...) or R = wblrnd(A,B,[m,n,...]) generates an m-by-n-by-... array. The A, B parameters can each be scalars or arrays of the same size as R.

Devroye [1] refers to the Weibull distribution with a single parameter; this is wblrnd with A = 1.


n1 = wblrnd(0.5:0.5:2,0.5:0.5:2)
n1 =
  0.0178  0.0860  2.5216  0.9124

n2 = wblrnd(1/2,1/2,[1 6])
n2 =
  0.0046  1.7214  2.2108  0.0367  0.0531  0.0917


[1] Devroye, L. Non-Uniform Random Variate Generation. New York: Springer-Verlag, 1986.

Introduced before R2006a

Was this topic helpful?