norm

Syntax

norm(mean, std, count)

Arguments

mean is a numeric scalar indicating the mean of a normal distribution.

std is a numeric scalar indicating standard deviation of a normal distribution.

count is an integral scalar/pair. A scalar indicates the length of the output vector. A pair indicates the dimension of the output matrix.

Details

Return a vector (matrix) that follows a normal distribution.

Examples

norm(2.0,0.1,3);
// output
[2.026602,1.988621,2.101107]

mean norm(3,1,10000);
// output
3.007866

std norm(10000);
// output
0.995806

//Generate a random matrix
norm(0, 1, 3:2)
col1 col2
(0.5399) (0.8475)
(1.0029) 1.811
(0.0485) (0.4339)