<< rand | Random | randperm >> |
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) |
a variable: n-by-n matrix will be generated.
x1-by-...-by-xN values
a string: 'single' or 'double'
a variable: single or double
a matrix of random numbers.
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.
rng('default');
randn
rng('default');
randn
rng('default');
randn(6)
rng('default');
randn(3, 2, 3)
rng('default');
randn(3, 2, 'single')
rng('default');
v = single([3, 3]);
randn(3, 2, 'like', v)
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET