Library: | distribs |
See also: | randomize2 ranexp2 uniform2 |
Quantlet: | normal2 | |
Description: | Normal2 generates arrays up to eight dimensions of pseudo random variables with the standard normal distribution. The algorithm by Box-Muller is used. |
Usage: | x=normal2(d1{,...,dn}) | |
Input: | ||
d1, ..., dn | scalars - number of elements in dimension 1, ..., n; 1 <= n <= 8 | |
Output: | ||
x | d1 x d2 x ... x dn matrix containing pseudo random variables with a standard normal distribution |
library("distribs") randomize2(0) normal2(2, 3)
Contents of x [1,] 0.11062 0.29474 2.2974 [2,] -0.97538 -0.018716 -0.25245