Contents Previous Next Subchapters Current Chapters-> prctile ftail tpdf ttail ittail cnormal inormal rand snormal seed colmad colmse colrange colmode kurtosis skewness randperm ranseed unifm0v1 unirnd normrnd exprnd gamrnd cauchyrnd gumbelrnd laplacernd lognrnd wblrnd binornd poissrnd exppdf expcdf normpdf unifpdf unifcdf wblpdf wblcdf colcor colcov colmean colstd colmax rowmax colsum rowsum colnorm rownorm median colmedian colmead colvar corr conv conv2 sum cumsum prod cumprod Parent Chapters-> Omatrix6 statistics snormal Search Tools-> contents reference index search

Generating Normally Distributed Pseudo Random Numbers
 Syntax `snormal(`rows`)` `snormal(`rows`, `cols`)` See Also randn , rand , seed , ranseed , cnormal , inormal

Description
Returns a real matrix in which the elements simulate independent realizations of the normally distributed random variable with mean 0 and variance 1, where rows and cols are the number of rows and columns, respectively, in the result. If the argument cols is not present, a square matrix is returned. ``` ```The seed and ranseed functions can change the initial point of the simulated random sequence.

Example ```      clear      noise = snormal(100, 1)      gstyle("cross", 1, 20)      gplot(noise) ``` returns the following plot:

Mlmode
In Mlmode , this function is called `randn` instead of `snormal`. If in Mlmode you enter ```      clear      noise = randn(100, 1);      x     = 1:100;      plot(x, noise, 'x') ``` O-Matrix will draw the same plot as above except with a larger symbol style.

Reference
The arguments must be scalars. If they are logical, real, double-precision or complex, the corresponding integer values are used.