How to plot circle by one single equation?
이전 댓글 표시
I need code which plot the circle in one single equation (variable). I have the code but i need code of single equation, the code which i have, it is composed of two equations as follow :
r=2;
x=0;
y=0;
th = 0:pi/6:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
plot(xunit, yunit);
채택된 답변
추가 답변 (3개)
Aditya Gupta
2020년 6월 26일
Adding to the MVP's (perfect) answer, I found one more way:
radius = 2;
originX = 0;
originY = 0;
rectangle('Position',[originX-radius originY-radius 2*radius 2*radius], ...
'Curvature',[1 1]);
axis equal
Harshith pothuri
2021년 1월 14일
0 개 추천
r=2;
x0=0;
y0=0;
theta = linspace(0,2*pi,100);
plot(x0 + r*cos(theta),y0 + r*sin(theta),'-')
axis equal
krishan Gopal
2021년 12월 9일
0 개 추천
Hi, can you tell me how to draw line pattern inside the circle
카테고리
도움말 센터 및 File Exchange에서 Language Fundamentals에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



