rndWeibull#
Purpose#
Computes Weibull pseudo-random numbers with the choice of underlying random number generator.
Format#
- x = rndWeibull(r, c, shape, scale)#
- { x, newstate } = rndWeibull(r, c, shape, scale, state)
- Parameters:
r (scalar) – number of rows of resulting matrix.
c (scalar) – number of columns of resulting matrix.
shape (matrix or vector or scalar) – shape parameter, ExE conformable matrix with r and c.
scale (matrix or vector or scalar) – scale parameter, ExE conformable matrix with r and c.
state (scalar or opaque vector) –
Optional argument.
scalar case
state = starting seed value only. If -1, GAUSS computes the starting seed based on the system clock.
opaque vector case
:state = the state vector returned from a previous call to one of the
rndrandom number functions.
- Returns:
x (RxC matrix) – Weibull distributed random numbers.
newstate (Opaque vector) – the updated state.
Remarks#
The properties of the pseudo-random numbers in x are:
r and c will be truncated to integers if necessary.
Examples#
// Set seed for repeatable output
rndseed 12345;
// Generate a 3x2 matrix of Weibull
// random numbers with shape = 2, scale = 1
x = rndWeibull(3, 2, 2, 1);
print x;
After the code above, x is:
0.31622572 0.89932217
0.52063284 1.4300231
0.82098160 1.6673537
See also
Functions rndCreateState(), rndStateSkip()