Navigation

Operators and Keywords

Function List:

C++ API

: rande (n)
: rande (m, n, …)
: rande ([m n …])
: v = rande ("state")
: rande ("state", v)
: rande ("state", "reset")
: v = rande ("seed")
: rande ("seed", v)
: rande ("seed", "reset")
: rande (…, "single")
: rande (…, "double")

Return a matrix with exponentially distributed random elements.

The arguments are handled the same as the arguments for rand.

By default, rande uses the Marsaglia and Tsang “Ziggurat technique” to transform from a uniform to an exponential distribution.

The class of the value returned can be controlled by a trailing "double" or "single" argument. These are the only valid classes.

Reference: G. Marsaglia and W.W. Tsang, Ziggurat Method for Generating Random Variables, J. Statistical Software, vol 5, 2000, http://www.jstatsoft.org/v05/i08/

See also: rand, randn, randg, randp.

Package: octave