Normalize vector in 3D space

9 visualizaciones (últimos 30 días)
Jennifer Fayad
Jennifer Fayad el 25 de En. de 2019
Respondida: John D'Errico el 26 de En. de 2019
Hello,
I'm trying to normalize a vector in 3d space into a unit vector

Respuestas (2)

Matt J
Matt J el 25 de En. de 2019
Editada: Matt J el 25 de En. de 2019
X= v./sqrt( sum(v.^2,2) );

John D'Errico
John D'Errico el 26 de En. de 2019
V = V./norm(V);
The default for norm is the 2-norm, so what you want.

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by