Equana

Back to Arrays

rand

Uniformly distributed random numbers in [0, 1).

Syntax

rand(n, cols) → Float64 scalar (no args), vector rand(n), or matrix rand(rows, cols)

Backends

TypeScript

Description

Uniformly distributed random numbers in [0, 1).

Parameters

NameDescription
nVector length (or rows with cols)
colsNumber of columns

Returns

Float64 scalar (no args), vector rand(n), or matrix rand(rows, cols)

Examples

Try It
>> rand(2, 3)
Try It
>> rand()

See Also