Skip to content

randn

builtin · libnexusinterp/corefcn/rand-proprietary.cc

: R = randn (…)
: s = randn ("state")

Normally distributed pseudorandom numbers with mean 0 and variance 1.

The size and class arguments are as for rand. randn ("state") returns the 2-element v5 normal state. Once rand or randn has been seeded with the legacy syntax, randn draws from that generator instead of the twister.