Unit:

Path: Math/Linear

% Unitize vectors by column.
 The magnitude is computed internally and available as a second output.
--------------------------------------------------------------------------
   Form:
   [u,m] = Unit( v )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   v            (:,n)     Vectors

   -------
   Outputs
   -------
   u            (:,n)     Unit vectors
   m            (:,1)     Vector magnitudes

--------------------------------------------------------------------------

Back to the Math Module page