HyperMath

randn

randn

Previous topic Next topic No expanding text in this topic  

randn

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Generates random data from the normal probability distribution.

Syntax

M = randn()

M = randn(n)

M = randn(m, n)

M = randn([m, n])

Arguments

Name

Description

 

m

Number of output rows.

 

n

Number of output columns.

Outputs

Name

Description

 

M

A matrix of double; random numbers from the normal probability distribution.

Example

Syntax

 

print(randn())

print(randn([3 2]))

print(randn(3, 2))

Comments

The 'randn' function is a random matrix generator. randn() without arguments gives a matrix of size 1x1.

The size inputs m and n should be positive finite integers.

See Also:

rand