|
|
|
|
|
Unit Vector
How to Examples Exercise How to: A unit vector is a vector with a norm of 1. To create a unit vector from ANY vector, we simply divide by its norm: unitV = v / norm(v) Examples: Given the vector v = [3; 1; 2; 3; 1], let's create a unit vector that goes in the same direction as v in R5: unitV = v / norm(v) And so we get back that unitV = [0.6; 0.2; 0.4; 0.6; 0.2]. Exercise: |