Rotation of Z Axis
2 views (last 30 days)
Show older comments
Hallo zusammen,
I have following code to describe a rotation around the Z-Axis.
Code:
%
subplot(3,1,3);
vecInit = [0, 0, 1];
vecBar3 = quatrotate(quatinv(Q), vecInit);
vecBar3 = -1 * atan2(vecBar3(:,1), vecBar3(:,2));
vecBar3 = vecBar3*180/pi;
plot(t, vecBar3)
Q is a Nx4 Matrix, which has the information of the movement in form of quaternions.
Is it the correct idea or does somebody has a different, maybe easier, solution idea?
0 Comments
Answers (1)
See Also
Categories
Find more on Coordinate Transformations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!