From arrays of two columns into multiple circles

1 回表示 (過去 30 日間)
Salem
Salem 2021 年 9 月 1 日
編集済み: Salem 2021 年 9 月 7 日
I have arrays of two columns, I want to plot multiple circles where the center of each cirlce is determined in each row, as each row consists of two numbers. Thank You
  1 件のコメント
Chunru
Chunru 2021 年 9 月 1 日
any requirement on the size of the circles?

サインインしてコメントする。

採用された回答

KSSV
KSSV 2021 年 9 月 1 日
C = rand(10,2) ;
plot(C(:,1),C(:,2),'o','Markersize',10)
If you want circle with given radius R.
C = rand(10,2) ;
R = 4 ;
th = linspace(0,2*pi) ;
x = R*cos(th) ;
y = R*sin(th) ;
figure
hold on
for i = 1:10
xc = C(i,1)+x ;
yc = C(i,2)+y ;
plot(xc,yc)
end
  1 件のコメント
Salem
Salem 2021 年 9 月 1 日
編集済み: Salem 2021 年 9 月 7 日
Thank you so much, it worked perfectly with me, but can you please explain briefly what does each variable represent?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by