Skip to content

UnitVector

UnitVector(position)

returns a unit vector with element 1 at the given position.

UnitVector(dimension, position)

returns a unit vector with dimension dimension and an element 1 at the given position.

See:

Examples

>> UnitVector(4,3)
{0,0,1,0}

Implementation status

  • ✅ - full supported

Github