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!



