使用matlab软件画出那个图

img


这个图怎么用语句画出来啊😪

你好同学,这个可以用for循环来画圆:

r = 1;%所画圆的半径
R = 2; %所画圆的圆心构成的的圆的半径
theta = linspace(0,2*pi,41);
xc = R*cos(theta);
yc = R*sin(theta);
for i = 1:1:numel(x)-1
x = xc(i)+r*cos(theta);%圆的x坐标
y = yc(i)+r*sin(theta);%圆的y坐标
plot(x,y)
hold on
end
axis equal

画图效果

img

你要是想圆颜色都是蓝色,可以把plot(x,y)换成

plot(x,y,'b')%'b'是指的蓝色,你也可以用'r'红色、'g'绿色等等

有帮助望采纳哦,支持答主冲榜