Polar Plotting issues:

5 次查看(过去 30 天)
David
David 2012-4-23
I am trying to plot points on the polar plot and am running into some issues. I tried coming up with my own algorithm to fix it but not sure what to do. I am trying to plot complex normalized numbers but the angles are coming out wrong. For something that should come out to 225 degrees is showing up as -45 degrees (btw i know polar requires the angle to be in radians). So for example if a = -.7071 - .7071*i , how would I graph this with a radius of 1 and all other possible scenarios? I have been trying theta = asin(imag(a)/radius) but this isn't working as stated before. Thanks David

回答(1 个)

Walter Roberson
Walter Roberson 2012-4-23
For real elements of X in the domain [-1,1], asin(X) is in the range [-Pi/2, Pi/2]
So... you will never get the equivalent of 225 degrees (but expressed as radians) out of asin(). You will need to do quadrant correction yourself.
Also, consider: if theta = arcsin(imag(a)/r) then sin(theta) = imag(a)/r, and since sin(theta) = y/r (provided that the same radius is intended), then the r cancel and y = imag(a). If those radius do mean the same thing, then perhaps it would make sense to express your coordinates as cartesian (possibly converting to polar using cart2pol() if you specifically want a polar plot.)

类别

Help CenterFile Exchange 中查找有关 Polar Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by