Effacer les filtres
Effacer les filtres

How to plot a straight line in polar coordinate system

39 vues (au cours des 30 derniers jours)
Jian Teng
Jian Teng le 30 Mai 2018
Commenté : Star Strider le 30 Mai 2018
I would like to plot a straight line in polar that is at 90 and 270 degree, and also a line at 0 degree. The line should have a length of 54.
  2 commentaires
John D'Errico
John D'Errico le 30 Mai 2018
Is the goal that the lines pass through the origin of the polar coordinate system, extending radially out to a radius of 54?
Jian Teng
Jian Teng le 30 Mai 2018
Yes, I would like to have the line pass through the origin. With a radius of 54.

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 30 Mai 2018
Try this:
figure(1)
polar([0 90 270; 0 90 270]*pi/180, [0 0 0; 1 1 1]*54) % Use ‘polar’
figure(2)
polarplot([0 90 270; 0 90 270]*pi/180, [0 0 0; 1 1 1]*54) % Use ‘polarplot’
I will post the plot image if you want me to.
  2 commentaires
Jian Teng
Jian Teng le 30 Mai 2018
Thank you so much!!!!!
Star Strider
Star Strider le 30 Mai 2018
As always, my pleasure!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Polar Plots dans Help Center et File Exchange

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by