필터 지우기
필터 지우기

scale polar plot

조회 수: 3 (최근 30일)
zozo
zozo 2012년 1월 11일
Hello,
I have a set of Gain values (in dB) stored in row vector G(1x360). When I plot G using the function
polar((1:360)*pi/180,G)
I get the directivity plot but it does not touch the boundary of the circle which makes it difficult to locate the exact angle (that is, the main lobe ends mid way inside the circle without touching its circumference). How can I change the radius/scale of the circle to make it fit perfectly?
[please note every time I run my program, my 'G' changes(since I have additive noise in my signal). So, I want to scale it according to the current G value each time.]
Please help
Please help

답변 (2개)

Honglei Chen
Honglei Chen 2012년 1월 11일
You can plot the normalized G if all you care is the location.
polar((1:360)*pi/180,G/max(G))
You should be careful using polar to plot directivity in dB because it is possible that G is negative. I think this could cause some issue with polar and you may need to offset the values.
  댓글 수: 6
zozo
zozo 2012년 1월 12일
Sir,
When I plot
polar((1:360)*pi/180,G/max(abs(G)));
I get a circle which is shifted towards the rim at the angle where it is maximum.
But when I plot
polar((1:360)*pi/180,10*log10(G/max(abs(G))));
I get an apple shaped plot originating from origin and its maximum towards the angle, but within the radius of the polar circle (that is not touching the rim)
How can I make it touch the rim to locate the angle precisely?
Walter Roberson
Walter Roberson 2012년 1월 12일
Glog = 10*log10(G);
polar((1:360)*pi/180, Glog/max(abs(Glog)))
You had values small enough that -log10 of them was greater than log10 of the maximum value. Apply the rescaling to what you are actually plotting, not to a pre-step.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2012년 1월 11일
If the only purpose of the plot is to figure out where the maximum is, then that can be calculated without doing the plot -- it is the angle at which max(abs(rho)) is located.
If you want the concentric circles labeled by rho, then there is no way to do it short of hacking the polar() code [or equivalent]. The code figures out the maximum absolute rho, draws a square twice that size, then asks the plot subsystem how big the automatically calculated bounds were, and uses those automatic bounds to construct the circles. (The automatic bounds are such that "nice" circle sizes are easily calculated.) Everything is done in Cartesian coordinates for the drawing and labeling.

카테고리

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