how can i draw a circle useing patch function?
조회 수: 14 (최근 30일)
이전 댓글 표시
how can i use patch funtion to draw a circle or ellipse
댓글 수: 0
답변 (2개)
Star Strider
2016년 4월 4일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!