Why the coordinate doesn't make sense after rotation matrix (rotx)?
Mostra commenti meno recenti
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 Commento
Ameer Hamza
il 17 Giu 2020
Which rotx() function are you using? One from MATLAB's phsased Phased Array System Toolbox or some other source?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Axes Transformations in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



