Polar Plotting issues:
5 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
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.)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Polar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!