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
2 件のコメント
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!



