How do I plot a circle with a given radius and center?
이전 댓글 표시
I would like to plot a circle with a given radius and center.
채택된 답변
추가 답변 (3개)
serwan Bamerni
2016년 2월 17일
편집: MathWorks Support Team
2023년 5월 26일
9 개 추천
There is now a function called viscircles():
댓글 수: 2
Walter Roberson
2016년 10월 17일
This is part of the Image Processing Toolbox
Walter Roberson
2020년 12월 25일
viscircles(app.segmented, centres, radii, 'color', 'b')
Another possibility is to approximate the circle using a polyshape with a large number of sides and plot that polyshape.
p = nsidedpoly(1000, 'Center', [2 3], 'Radius', 5);
plot(p, 'FaceColor', 'r')
axis equal
댓글 수: 1
Walter Roberson
2021년 6월 9일
Remember that an equilateral triangle has a 60 degree range.
Using function "fplot" would be my simplest way:
Unit circle:
fplot(@(t) sin(t), @(t) cos(t));
grid on
Circle with center "x", "y" and radius "r":
x = 3; y = 4; r = 5;
fplot(@(t) r*sin(t)+x, @(t) r*cos(t)+y);
grid on;
카테고리
도움말 센터 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



