scale polar plot
4 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
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 个评论
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
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.
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!