tensor.rand edit page

tensor with uniformly distributed random entries

Description

All entries are drawn independently from the uniform distribution on the interval [0,1]. The resulting tensor has in general none of the symmetries a physical tensor of that rank would have.

Syntax

T = tensor.rand('rank',2)
T = tensor.rand('rank',4)
T = tensor.rand(100,'rank',2)
T = tensor.rand('rank',2,cs)

Input

n,m size of the array of tensors
cs crystalSymmetry

Output

T tensor

Options

rank rank of the tensor, default is 2

See also

tensor.eye tensor.zeros