Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.479 randomn

randomn( [seed=seed,] [dimensions])

Returns a double array with the specified dimensions, filled with pseudo-random numbers with a standard normal distribution (i.e., zero average and unit variance). seed specifies a seed for the random numbers, and must be non-zero. The same seed generates the same sequence of pseudo-random numbers every time. Different seeds generate different sequences. If you specify a seed but no dimensions, then the seed is set and a scalar 1 is returned.

The method used to generate the pseudo-random numbers is Matsumoto and Nishimura’s “Mersenne Twister” mt19937 generator. The period of this generator is 2^19937 - 1, or about 1e6000.

Alias: random(/normal)

See also: random, randomb, randomu, Random Arrays