+0

# what is the rotation of 90degree

0
456
6

How we can write rotation of 45degree in Matlab

Jul 24, 2014

#5
+27377
+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

Jul 25, 2014

#1
+27377
+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).

Jul 24, 2014
#2
+95360
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.

Jul 25, 2014
#3
+27377
+5

Does the following help?

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.

Jul 25, 2014
#4
+95360
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?

Jul 25, 2014
#5
+27377
+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
#6
+95360
0

Thank you Alan, that all makes sense.

Jul 26, 2014