Why the coordinate doesn't make sense after rotation matrix (rotx)?
이전 댓글 표시
Hello,
I got confused about the rotation matrix results. I want to rotate the structure around the z-axis with theta first, and then rotate around x-axis for phi.
theta=60;
phi=30;
R=rotx(phi)*rotz(theta);
R*[1; 0; 0];
% use rotation matrix to transform coordinate
% [X,Y,Z] is original coordinate
[X,Y,Z]=ndgrid(xa,ya,za);
[ie,je,ke]=size(X);
a=[X(:),Y(:),Z(:)];
% new coordinate
anew=R*(a.');
The result is [0.5; 0.75;0.433] for the vector of x-axis. But in my opinion, the new x-axis should be [0.5;-0.866;0]. I am not sure whether my understanding is wrong. Whether I can use rotation matrix to get the correct coordinate?

댓글 수: 1
Ameer Hamza
2020년 6월 17일
Which rotx() function are you using? One from MATLAB's phsased Phased Array System Toolbox or some other source?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Axes Transformations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



