how to change the values on the polar axis?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear sir/madam,
I am plotting antenna radiation patterns using matlab, using polar command. When I plot the radiation pattern using the polar command the polar axis shows [0 to 360] degrees. This is good for azimuthal angle. But for the elevation angle I need the polar axis to be shown as [0 to 180] on one side and [0 to -180] on the other side. How can I do this in matlab? Looking forward for your reply.
Thanking you, BSD
0 commentaires
Réponses (1)
Walter Roberson
le 12 Juil 2011
polar(....);
ph = allchild(gca); %hidden children!!
Now, ph(6:17) are handles of text() objects whose String property is an angle. The correspondences are:
6: 0, 7: 180, 8: 330, 9: 150, 10: 300, 11: 120, 12: 270, 13: 90, 14: 240, 15: 60, 16: 210, 17: 30
Thus you would, for example, set(ph(8),'String','-30')
If you want the -180 to appear, you are going to have to text() a new label in to place. You could get() the Position of ph(7), fudge it a bit, and text() the '-180' in to place beside the '180'
0 commentaires
Voir également
Catégories
En savoir plus sur Polar Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!