Message Boards Message Boards

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

How to input a rotated vector?

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

Thanks David.

1) r = RotationMatrix[theta] worked fine. If I wanted to try different matrices, for example {{Cos[theta], Sin[theta]}, {-Sin[theta], Cos[theta]}} how would I do that?

2) When I input r.{x, y} I got out[55]= {x Cos[theta] - Sqrt[1 - x^2] Sin[theta], Sqrt[1 - x^2] Cos[theta] + x Sin[theta]}

Not sure whats different?

Thanks Alan

POSTED BY: Alan Smith
Posted 9 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

Group Abstract Group Abstract