Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.8K Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to input a rotated vector?

Posted 11 years ago

New to Mathematica, 10.1, following the guide, but getting wrong results. I'm trying to input a vector after being transformed by a rotation matrix, as:

m1={{a Cos Theta + b Sin Theta},{-a Sin Theta + b Cos Theta}}

but I get a row of 4 numbers as output? I'm trying to get a visualization of this vector so I can compare it with, for example:

m1={{a Cos Theta - b Sin Theta},{a Sin Theta + b Cos Theta}}

and a few other variations. So please give me the exact input I should be typing? Much appreciated, Alan

POSTED BY: Alan Smith
5 Replies
Posted 11 years ago
POSTED BY: David Keith
Posted 11 years ago

Thanks David, but in 1) I wanted to know how to look at similar matrices to the rotation matrix as well? I tried Clear[y], got the same result. I note that even when I start a new notebook, it seems to keep previous values - is there a clear all that will guarantee nothing left over from previous work? Cheers ALan

POSTED BY: Alan Smith
Posted 11 years ago
POSTED BY: David Keith
Posted 11 years ago
POSTED BY: Alan Smith
Posted 11 years ago
In[1]:= r = RotationMatrix[theta]

Out[1]= {{Cos[theta], -Sin[theta]}, {Sin[theta], Cos[theta]}}

In[2]:= r.{x, y}

Out[2]= {x Cos[theta] - y Sin[theta], y Cos[theta] + x Sin[theta]}
POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard