| Statistics Toolbox | Search  Help Desk |
| weibrnd | Examples |
Random numbers from the Weibull distribution.
Syntax
R = weibrnd(A,B) R = weibrnd(A,B,m) R = weibrnd(A,B,m,n)
Description
R = weibrnd(A,B) generates Weibull random numbers with parameters A and B. The size of R is the common size of A and B if both are matrices. If either parameter is a scalar, the size of R is the size of the other parameter.
R = weibrnd(A,B,m) generates Weibull random numbers with parameters A and B. m is a 1-by-2 vector that contains the row and column dimensions of R.
R = weibrnd(A,B,m,n) generates Weibull random numbers with parameters A and B. The scalars m and n are the row and column dimensions of R.
Devroye refers to the Weibull distribution with a single parameter; this is weibrnd with A = 1.
Examples
n1 = weibrnd(0.5:0.5:2,0.5:0.5:2)
n1 =
0.0093 1.5189 0.8308 0.7541
n2 = weibrnd(1/2,1/2,[1 6])
n2 =
29.7822 0.9359 2.1477 12.6402 0.0050 0.0121
Reference
Devroye, L., Non-Uniform Random Variate Generation. Springer-Verlag.