Normalize vector in 3D space

Réponses (2)

Matt J
Matt J le 25 Jan 2019
Modifié(e) : Matt J le 25 Jan 2019

0 votes

X= v./sqrt( sum(v.^2,2) );
John D'Errico
John D'Errico le 26 Jan 2019

0 votes

V = V./norm(V);
The default for norm is the 2-norm, so what you want.

Catégories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by