randn
Normally distributed random number.
Syntax
M = randn
M = randn(n)
M = randn(x1, x2, ... , xN)
M = randn(sz)
M = randn(x1, x2, ... , xN, classname)
M = randn(x1, x2, ... , xN, 'like', var)
Input argument
n - a variable: n-by-n matrix will be generated.
x1, x2, ... , xN - x1-by-...-by-xN values
classname - a string: 'single' or 'double'
var - a variable: single or double
Output argument
M - a matrix of random numbers.
Description
randn returns a matrix with normally distributed random elements having zero mean and variance one.
By default, randn uses the ziggurat algorithm implemented by Boost.
seed can be modified using rng.
Examples
See also
History
Version | Description |
---|---|
1.0.0 | initial version |
Author
Allan CORNET
Last updated