# rndLaplace¶

## Purpose¶

Computes Laplacian pseudo-random numbers with the choice of underlying random number generator.

## Format¶

x = rndLaplace(r, c, loc, scale)
{ x, newstate } = rndLaplace(r, c, loc, scale, state)
Parameters
• r (scalar) – number of rows of resulting matrix.

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

• loc (matrix, vector or scalar) – location parameter, scalar or ExE conformable matrix with r and c.

• scale (matrix, vector or scalar) – scalar or 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 rnd random number functions.

Returns
• x (RxC matrix) – Laplacian distributed random numbers.

• newstate (Opaque vector) – the updated state.

## Remarks¶

The properties of the pseudo-random numbers in x are:

$\begin{split}E(x) = location\\ Var(x) = 2*scale^2\end{split}$

r and c will be truncated to integers if necessary.