Use vrrotvec to calculate the rotation angles between two vectors (R2015b)

조회 수: 4 (최근 30일)
Lu Gao
Lu Gao 2016년 10월 20일
댓글: Jan 2019년 1월 17일
I need to calculate the rotation angle to transform vector a = [1, 0, 0]' to b = [1/sqrt(3), 1/sqrt(3), 1/sqrt(3)]',such that I script below:
X = [1, 0, 0]';
Y = [1/sqrt(3), 1/sqrt(3), 1/sqrt(3)]';
R = vrrotvec(X, Y);
As the outcome, I have R = 0, -0.7071, 0.7071, 0.9553
What is the meaning of the first three items, i.e. 0, -0.7071 and 0.7071? Are they the cosine value of the rotation angle against x-, y- and z-axes?
  댓글 수: 5
Mritula C
Mritula C 2019년 1월 16일
Wont there 3 rotation angles corresponding to 3 different planes?
Jan
Jan 2019년 1월 17일
Mritula C wrote as flag: "Answer is clear and to the point. thanks"
Please use flags only to tell editors and admins, that a message might conflict with the terms of use, e.g. spam or rudeness. Thanks.

댓글을 달려면 로그인하십시오.

채택된 답변

dan
dan 2017년 8월 23일
The first 3 elements is the vector in the first coordinate system. The fourth element is the rotation about the new vector to get to the vector you want.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Trigonometry에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by