Normalize vector in 3D space
이전 댓글 표시
Hello,
I'm trying to normalize a vector in 3d space into a unit vector
답변 (2개)
X= v./sqrt( sum(v.^2,2) );
John D'Errico
2019년 1월 26일
V = V./norm(V);
The default for norm is the 2-norm, so what you want.
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!