How to get in a plot a circle and not an ellipse

12 vues (au cours des 30 derniers jours)
Boughrara kamel
Boughrara kamel le 28 Avr 2015
Hi all, How to get in the figure a circle and not an ellipse. Thank you
t=0:2*pi/50:2*pi;
y=1*sin(4*t);
figure(1);hold on; polar(t,5+y,'-r');ezpolar('5');hold off;

Réponse acceptée

Star Strider
Star Strider le 28 Avr 2015
Specify axis square:
t=0:2*pi/50:2*pi;
y=1*sin(4*t);
figure(1);hold on; polar(t,5+y,'-r');ezpolar('5');hold off;axis square

Plus de réponses (1)

Image Analyst
Image Analyst le 28 Avr 2015
Code for plotting both a circle and an ellipse are in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by