scale polar plot

6 visualizaciones (últimos 30 días)
zozo
zozo el 11 de En. de 2012
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

Respuestas (2)

Honglei Chen
Honglei Chen el 11 de En. de 2012
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 comentarios
zozo
zozo el 12 de En. de 2012
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 el 12 de En. de 2012
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.

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 11 de En. de 2012
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.

Categorías

Más información sobre Polar Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by