plotting new axis given a DCM

Good Morning,
If I am given a coordinate system centered at [0,0,0] and have obtained the cosines of the angles (DCM) how can I apply this to obtain the rotated coordinate system on a plot?
Thanks,
Mel

10 Comments

Why not plot whatever it is that you want to plot on two separate axes?
I want to show the new x axis with the other coordinate system.
Plot a unit vector on it?
I would love to but I don't know how to apply it. Say I have a coordinate system centered at [0,0,0] and I want to extend the new x axis starting from that origin uh how about 100 units given a DCM for the new x axis of [.995 .035 .121]. I dont know how to apply the DCM to that current axis to get that new vector.
OldCords = [0 1;0 0;0 0] %origin, and x = 1 (unit vector)
NewCords = DCM * OldCords;
plot3(NewCords(1,:),NewCords(2,:),NewCords(3,:))
hgtransform() ?
The DCM should produce a new x axis that is of three rotations right? Shouldn't I have a set of three points that isn't zero?
Maybe using the quiver function since I thought the DCM was the unit vector if its expressed already in cosines. does this make sense? quiver3(0, 0, 0, .995, .035, .120). Or if I want to extend that 100 units I would just multiply the DCM values by 100?!?
Iain
Iain on 30 Aug 2013
Edited: Iain on 30 Aug 2013
What I gave you was two coordinates, so that you'd get a line starting at the origin, before and after transformation.
Yes, each column of the DCM gives you the corresponding unit vector.
And, for me, its knocking off time...
Thank you for being patient with me and for your assistance.

Sign in to comment.

Answers (0)

Asked:

on 30 Aug 2013

Community Treasure Hunt

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

Start Hunting!