Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.
Florian Rappl edited this page Dec 21, 2014 · 2 revisions

randl

Generates a matrix with Laplace distributed random values. In probability theory and statistics, the Laplace distribution is a continuous probability distribution named after Pierre-Simon Laplace. It is also sometimes called the double exponential distribution, because it can be thought of as two exponential distributions (with an additional location parameter) spliced together back-to-back, but the term double exponential distribution is also sometimes used to refer to the Gumbel distribution. The difference between two independent identically distributed exponential random variables is governed by a Laplace distribution, as is a Brownian motion evaluated at an exponentially distributed random time. Increments of Laplace motion or a variance gamma process evaluated over the time scale also have a Laplace distribution.

References

randl()

Generates one Laplace distributed random value with mu set to 0 and b set to 1.

Returns 1. entry

Scalar

Example

randl()

Outputs a scalar that has been generated with respect to the distribution.

randl(dim)

Generates a n-by-n matrix with Laplace distributed random values with mu set to 0 and b set to 1.

Argument dim

Scalar

Returns 1. entry

Matrix

Example

randl(3)

Gives a 3x3 matrix with Laplace dist. rand. values.

randl(rows,cols)

Generates a m-by-n matrix with Laplace distributed random values with mu set to 0 and b set to 1.

Argument rows

Scalar

Argument cols

Scalar

Returns 1. entry

Matrix

Example

randl(3, 1)

Gives a 3x1 matrix with Laplace dist. rand. values.

randl(rows,cols,mu,b)

Generates a m-by-n matrix with Laplace distributed random values with a custom mu (mean) and b (variance) parameter.

Argument rows

Scalar

Argument cols

Scalar

Argument mu

Scalar

Argument b

Scalar

Returns 1. entry

Matrix

Example

randl(3, 1, 10, 2.5)

Gives a 3x1 matrix with Laplace dist. rand. values around 10 with the mean mu set to 10 and variance parameter b set to 2.5. The variance scales with b^2, such that the standard deviation scales with b.

Clone this wiki locally