How can I do a Method which returns a Rotation Matrix?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello,
I want to implement the method rotTheta(phi, theta), which returns a rotation matrix containing a vector when multiplied ¨ φ degrees about an axis rotates, which is defined by y = x tan(θ).
I know how to implement a rotation matrix over the x,y- and z-axis but I'm not sure how to do the mentioned method. It would be a pleasure if you could help me.
댓글 수: 0
답변 (1개)
Torsten
2022년 11월 16일
syms theta phi
M = [cos(theta) -sin(theta) 0;sin(theta) cos(theta) 0;0 0 1]*[1 0 0;0 cos(phi) -sin(phi);0 sin(phi) cos(phi)]*[cos(theta) sin(theta) 0;-sin(theta) cos(theta) 0;0 0 1]
댓글 수: 2
Torsten
2022년 11월 16일
- Rotate by -theta about the z-axis to make your axis of rotation y = tan(theta)*x to fit with the x-axis (M1).
- Rotate by phi about the x-axis (M2).
- Rotate back by theta about the z-axis (M3).
- The complete rotation is then described by M = M3*M2*M1.
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!