<< sphere Geometry GPS >>

scilib_geo >> Geometry > unitVec

unitVec

Function returns the unit vector of a given vector or point in carthesian coordinates.

Calling Sequence

E = unitVec(vector)
E = unitVec(listofvectors)

Parameters

vector

coordinates of a point or vector (row vector or matrix of row vectors).

listofvectors

list of vectors (column vectors) more than one!.

E

unit vector (as row vector or matrix of row vectors)

Description

This function calculates the unit vector to a point of a given vector or point in carthesian coordinates.

Examples

unitVec([1, 1])
unitVec([1;1], [1;2])
unitVec([1,2,3;4,5,6])

Authors


Report an issue
<< sphere Geometry GPS >>