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

2 views (last 30 days)
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;

Accepted Answer

Star Strider
Star Strider on 28 Apr 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

More Answers (1)

Image Analyst
Image Analyst on 28 Apr 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.

Categories

Find more on Spline Postprocessing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!