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
| Name | Description |
|---|---|
| n | Vector length (or rows with cols) |
| cols | Number of columns |
Returns
Float64 scalar (no args), vector rand(n), or matrix rand(rows, cols)