How to plot circle by one single equation?
Ältere Kommentare anzeigen
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);
Akzeptierte Antwort
Weitere Antworten (3)
Aditya Gupta
am 26 Jun. 2020
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
am 14 Jan. 2021
0 Stimmen
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
am 9 Dez. 2021
0 Stimmen
Hi, can you tell me how to draw line pattern inside the circle
Kategorien
Mehr zu Language Fundamentals finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



