Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.
Florian Rappl edited this page Dec 21, 2014 · 2 revisions

rand

Generates a matrix with uniformly distributed random values between 0 and 1.

References

rand()

Generates one uniformly dist. random value between 0 and 1.

Returns 1. entry

Scalar

rand(dim)

Generates a n-by-n matrix with uniformly dist. random values between 0 and 1.

Argument dim

Scalar

Returns 1. entry

Matrix

Example

rand(5)

Generates a 5x5 matrix with an uni. dist. rand. value in each cell.

rand(rows,cols)

Generates a n-by-m matrix with uniformly dist. random values between 0 and 1.

Argument rows

Scalar

Argument cols

Scalar

Returns 1. entry

Matrix

Example

rand(5, 2)

Generates a 5x2 matrix with an uni. dist. rand. value in each cell.

Clone this wiki locally