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!
