how can i draw a circle useing patch function?
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
how can i use patch funtion to draw a circle or ellipse
0 Kommentare
Antworten (2)
Star Strider
am 4 Apr. 2016
This works:
t = linspace(0, 2*pi);
r = 1;
x = r*cos(t);
y = r*sin(t);
figure(1)
patch(x, y, 'g')
axis equal
The code for an ellipse would be the same, except that there would be different values of ‘r’ for the ‘x’ and ‘y’ calculations.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Polygons finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!