randn: Matrix/Array of Normal Random Numbers

Description Usage Arguments Value See Also Examples

Description

Construct a matrix or multi-way array of normal random deviates.

Usage

1
randn(nrow = 1, ncol = 1, ..., mean = 0, sd = 1, atleast_2d = NULL)

Arguments

nrow

The desired number of rows.

ncol

The desired number of columns.

...

Further dimensions of the array.

mean

Mean for the normal distribution. (randn only).

sd

Standard deviation for the normal distribution. (randn only).

atleast_2d

Logical indicating whether or not to force column vectors to have a second dimension equal to one. Defaults to FALSE. This behavior can also be changed globally using, for example options(atleast_2d = TRUE).

Value

A matrix or array of pseudorandom numbers.

See Also

rand, randi, rnorm.

Examples

1
2
randn(100, 100)  # 100 by 100 matrix of standard normal random variates
randn(2, 3, mean = 10, sd = 0.1)

ramify documentation built on May 2, 2019, 5:58 a.m.