matlab gaussian
Use rand() for values positive only
or randn() for values positive and negative
Y = randn returns a pseudorandom, scalar value drawn from a normal distribution with mean 0 and standard deviation 1.
Y = randn
returns an n-by-n matrix of values derived as described above.
Y = randn(m,n) or Y = randn([m n]) returns an m-by-n matrix of the same.
Y = randn(m,n,p,...) or Y = randn([m n p...]) generates an m-by-n-by-p-by-... array of the same.
Y = randn(size(A)) returns an array that is the same size as A.
Example
R = randn(3,4) might produce
R =
1.1650 0.3516 0.0591 0.8717
0.6268 -0.6965 1.7971 -1.4462
0.0751 1.6961 0.2641 -0.7012