Vector normalization
[v,norms] = CL_unitVector(u)
Normalizes vectors.
Given a vector or matrix of vectors u, it computes the corresponding normalized vector (or matrix of vectors) v = u / ||u||.
This function also returns the norms (norms) of the input vectors as second output argument.
Notes:
- If a vector is a null vector, the corresponding unit vector is undefined (%nan).
- If u is an hypermatrix (of dimension 3), v(:,:,i) = CL_unitVector(u(:,:,i)).
Vector or matrix of column vectors (PxNxK). u is an hypermatrix if K>1.
Vector or matrix of column vectors with norms equal to 1 (%nan if norm(u) is 0). (PxNxK)
Norms of input vectors. (1xNxK)
CNES - DCT/SB