# rndGumbel¶

## Purpose¶

Computes Gumbel distributed random numbers with a choice of underlying random number generator.

## Format¶

r = rndGumbel(rows, cols, location, scale)
{ r, newstate } = rndGumbel(rows, cols, location, scale, state)
Parameters
• rows (scalar) – number of rows of resulting matrix.

• cols (scalar) – number of columns of resulting matrix.

• location (scalar or matrix) – location parameter, scalar or ExE conformable matrix with rows and cols

• scale (scalar or matrix) – scaler parameter, scalar or ExE conformable matrix with rows and cols

• 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 rnd random number functions.

Returns
• r (rows x cols matrix) – Gumbel distributed random numbers.

• newstate (Opaque vector) – the updated state.

## Remarks¶

This function uses the definition of the Gumbel distribution corresponding to the minimum extreme. The properties of the pseudo-random numbers in y are:

$\begin{split}E(y) = location - \gamma*scale \approx\\ location - 0.5772*scale\\ \gamma = \text{Euler-Mascheroni constant}\\ Var(y) = \frac{(\pi*scale)^2}{6}\end{split}$

r and c will be truncated to integers if necessary.