I am trying to find the theta part from an exponential value.
Suppose, i take a variable
so this will give me
0.2837 - 0.9589i
Now i want to find that "5" from this value. So, i go with this "angle(z)" and matlab shows
Shouldn't it be 5, according to theory ??
Or if i go with the eular formula like, exp(i*theta)= cos(theta) + i*sin(theta)
so, theta= atan(0.2837/-0.9589) = -0.2877 !!
How do i get the theta=5 back, i don't know if i am missing something.
No products are associated with this question.
The reason is that:
5 rad = -1.2832 rad % (-1.2832 + 2*pi = 5)
x = x + n*2*pi; % where x is an angle in radians, and n is an integer.
Matlab will always give you values between +/- pi.
And you use Eular the wrong way around: tan = sin/cos, not cos/sin.