Calculator Community => TI Calculators => TI-BASIC => Topic started by: Radical Pi on December 24, 2007, 11:25:00 am
Title: Rotation of a 3x3 matrix
Post by: Radical Pi on December 24, 2007, 11:25:00 am
So, I need to be able to do this for a certain *project* I'm working on. I didn't want to have to resort to a For() loop and manually store all coordinates into a temporary second matrix before overwriting the first one. Is there any magical identity matrix that can do this? Or will I have to do it the boring way?
Just for clarification, I want: c1-->
CODE
ec1[A B C] [D E F] [G H I]c2
ec2 to become: c1
-->
CODE
ec1[G D A] [H E B] [I F C] or [C F I] [B E H] [A D G]c2
ec2
I'm doubting more and more that there's an efficient way of doing that, but if there is I can't seem to find it myself :P
Title: Rotation of a 3x3 matrix
Post by: vuurrobin on December 24, 2007, 12:17:00 pm
I think that rowswap([A],1,3)t would do the trick. the t is that superscript t for transpose
Title: Rotation of a 3x3 matrix
Post by: Radical Pi on December 24, 2007, 12:31:00 pm
That works perfectly :D Thanks, I'll have to remember to mention you in the credits.
Title: Rotation of a 3x3 matrix
Post by: burr on December 24, 2007, 09:06:00 pm
If you need some help remembering the matrix commands, we have a page for that on TI|BD: http://tibasicdev.wikidot.com/matrices.