+0  
 
0
223
6
avatar

How we can write rotation of 45degree in Matlab

Guest Jul 24, 2014

Best Answer 

 #5
avatar+26387 
+5

The rotation vector (rot) is ei*pi/4

ei*pi/4 = cos(pi/4)+i*sin(pi/4) = 1/√2 + i*1/√2 = 0.7071 + i*0.7071

 

Then vrot = v*rot = 

(2 + 3i)*(0.7071 + 0.7071i) = 2*0.7071-3*0.7071 +i*(2*0.7071 + 3*0.7071) = -0.7071 +i*5*0.7071 = -0.7071 + 3.5355i

Alan  Jul 25, 2014
Sort: 

6+0 Answers

 #1
avatar+26387 
+5

If you mean rotate a vector by 45° then multiply it by (1/2)i, where i = √(-1) to get a 45° anti-clockwise rotation.

Oops!  No, this will give a rotation by 90° and halve the magnitude!  You need to multiply by exp(i*pi/4).

Alan  Jul 24, 2014
 #2
avatar+91404 
0

Alan, I am not familiar with matlab but I am interested in this concept.

Can you try to explain it a little more please?  Maybe with a picture.  

Melody  Jul 25, 2014
 #3
avatar+26387 
+5

Does the following help?

vector rotation

vector rotation plot

Basically we are treating a vector as a complex number with the x-component as the real part and the y-component as the imaginary part.

Alan  Jul 25, 2014
 #4
avatar+91404 
0

Thanks Alan,

oh, I didn't see the oops bit before so it makes a little more sense now.

Where do the numbers 

0.7071 abd 3.5355 come from?  Are they input or output?

Melody  Jul 25, 2014
 #5
avatar+26387 
+5
Best Answer

The rotation vector (rot) is ei*pi/4

ei*pi/4 = cos(pi/4)+i*sin(pi/4) = 1/√2 + i*1/√2 = 0.7071 + i*0.7071

 

Then vrot = v*rot = 

(2 + 3i)*(0.7071 + 0.7071i) = 2*0.7071-3*0.7071 +i*(2*0.7071 + 3*0.7071) = -0.7071 +i*5*0.7071 = -0.7071 + 3.5355i

Alan  Jul 25, 2014
 #6
avatar+91404 
0

Thank you Alan, that all makes sense. 

Melody  Jul 26, 2014

3 Online Users

avatar
We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.  See details