Take a vector and convert it to a unit vector (normalize)

normalize a vector to a unit vector

Download
Download

You are now following this Submission

Cite As

James West (2026). Take a vector and convert it to a unit vector (normalize) (https://au.mathworks.com/matlabcentral/fileexchange/28605-take-a-vector-and-convert-it-to-a-unit-vector-normalize), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.3.0

Added error checking
Added output format equal to input format
Added ability to handle multi-dimensional arrays.

Download
1.2.0

Changed the code to operate in n dimensions.
It will now transform your vector back to its original notation
Error checking is now done to detect irregular calculations, and NaN values in the output
Changed the name to be more accessible.

Download
1.0.0

Download