필터 지우기
필터 지우기

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

채택된 답변

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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by