Filter löschen
Filter löschen

Polar Plotting issues:

5 Ansichten (letzte 30 Tage)
David
David am 23 Apr. 2012
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

Antworten (1)

Walter Roberson
Walter Roberson am 23 Apr. 2012
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.)

Kategorien

Mehr zu Polar Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by