Learn R Programming

PopED (version 0.7.0)

randn: Function written to match MATLAB's randn function

Description

Generate random samples from a standardized normal distribution and return in matrix form.

Usage

randn(dim1, dim2 = NULL)

Value

Matrix of random generated samples.

Arguments

dim1

The dimension of the matrix (if square), otherwise the number of rows.

dim2

The number of columns, if different from the number of rows.

See Also

Other MATLAB: cell(), diag_matlab(), feval(), fileparts(), isempty(), ones(), rand(), size(), tic(), toc(), zeros()

Examples

Run this code

randn(2,3)

randn(5)

Run the code above in your browser using DataLab