Normalize vector in 3D space

11 Ansichten (letzte 30 Tage)
Jennifer Fayad
Jennifer Fayad am 25 Jan. 2019
Beantwortet: John D'Errico am 26 Jan. 2019
Hello,
I'm trying to normalize a vector in 3d space into a unit vector

Antworten (2)

Matt J
Matt J am 25 Jan. 2019
Bearbeitet: Matt J am 25 Jan. 2019
X= v./sqrt( sum(v.^2,2) );

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

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by