Drawing a circle with known radius
15 ビュー (過去 30 日間)
古いコメントを表示
How can i create a circle shape including 100 circles with known radius. Labeled with 4 different colors.
0 件のコメント
採用された回答
KSSV
2022 年 4 月 17 日
編集済み: KSSV
2022 年 4 月 17 日
th = linspace(0,2*pi)' ;
R = 1;
x = R*cos(th) ;
y = R*sin(th) ;
% make groups
G = zeros(size(th)) ;
G(th >= 0 & th < pi/2) =1 ;
G(th>=pi/2 & th < pi) = 2 ;
G(th>=pi & th < 3*pi/2) = 3 ;
G(th >=3*pi/2 & th < 0) = 4 ;
gscatter(x,y,G,'bmgr','o')
axis equal
2 件のコメント
Image Analyst
2022 年 4 月 17 日
There is also a function called viscircles() you might want to know about.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
