How can I can I draw multiple circles with figure that have character into them

조회 수: 2 (최근 30일)
Hello I made a Matlab project where I plotted two circles that represented electrical charges.
And i used this code
figure();
h=rectangle('Position',[xCn-a/2,yCn-a/2,a,a],'curvature',[1 1]);
set(h,'Facecolor',[0 0 0],'Edgecolor',[0 0 0]);
text(0.43,0.05,'-','Color','white','FontSize',30);
h=rectangle('Position',[xCp-a/2,yCp-a/2,a,a],'curvature',[1 1]);
set(h,'Facecolor',[1 0 0],'Edgecolor',[1 0 0]);
text(-0.6,0,'+','Color','white','FontSize',30);
How can I Draw 5 circles for each charge with their sign so it looks like this? I only need help for drwaing the circles ignore the blue arrows
Thanks for your answers

답변 (1개)

Image Analyst
Image Analyst 2022년 4월 24일
Try viscircles() in the Image Processing Toolbox.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by