Normalize vector in 3D space

10 ビュー (過去 30 日間)
Jennifer Fayad
Jennifer Fayad 2019 年 1 月 25 日
回答済み: John D'Errico 2019 年 1 月 26 日
Hello,
I'm trying to normalize a vector in 3d space into a unit vector

回答 (2 件)

Matt J
Matt J 2019 年 1 月 25 日
編集済み: Matt J 2019 年 1 月 25 日
X= v./sqrt( sum(v.^2,2) );

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by