<< CL_unMod Math CL_vectAngle >>

CelestLab >> Math > CL_unitVector

CL_unitVector

Vector normalization

Calling Sequence

[v,norms] = CL_unitVector(u)

Description

Parameters

u:

Vector or matrix of column vectors (PxNxK). u is an hypermatrix if K>1.

v:

Vector or matrix of column vectors with norms equal to 1 (%nan if norm(u) is 0). (PxNxK)

norms:

Norms of input vectors. (1xNxK)

Authors

See also

Examples

// With a matrix :
u = rand(3,15);
[v,norms] = CL_unitVector(u);

// With an hypermatrix :
u = rand(3,15,3);
[v,norms] = CL_unitVector(u);

Report an issue
<< CL_unMod Math CL_vectAngle >>