Need a script to plot a circle with given radius and center
古いコメントを表示
I need some help guys! Need a script to plot a circle with center(5,7) and radius 3. I have these:
clear clc
r=3;
t=0:pi/24:2*pi;
x=r*cos(t);
y=r*sin(t);
plot(x,y,x,y)
grid on
But only the radius works.. help please.
採用された回答
その他の回答 (2 件)
Image Analyst
2020 年 6 月 11 日
Here's another way
viscircles([5,7], 3);
2 件のコメント
Tamara del Águila
2021 年 5 月 26 日
but which units does viscircle use? When I draw a circular roi with drawcircle, and then I plot in the obtained coordinates a circle with viscircle, the size do not match...
Image Analyst
2021 年 5 月 26 日
I believe they both use units of whatever the axes control is using. I think they should be the same. Post a small snippet of your code showing how you compute "size" and a screenshot showing the different circle sizes.
Alamgir Khan
2020 年 6 月 11 日
編集済み: Alamgir Khan
2020 年 6 月 11 日
0 投票
In parametric form of the circle of radius 1, at centred(0,0) x=cos(2 pi×t) and y=sin(2pi ×t) using ezplot command
カテゴリ
ヘルプ センター および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!