Matlab绘制子图subplot使用攻略

 时间:2024-10-12 09:07:43

我们在sci论文的写作过程中通常遇到多个子图画在同一张图上,这篇文档将通过多个程序算例详细介绍Matlab绘制子图subplot使用攻略

Matlab绘制子图subplot使用攻略

2、例如:复制一下程序到matlab窗口figuret=0:0.001:1;y1=sin(10*t);y2=sin(15*t);y3=sin(20*t); y4=sin(25*t);subplot(2,2,1)plot(t,y1,'--r*','linewidth',2,'markersize',5)text(.5,.5,{'subplot(2,2,1)'},... 'FontSize',14,'HorizontalAlignment','center')subplot(2,2,2)plot(t,y2,'--b*','linewidth',2,'markersize',5)text(.5,.5,{'subplot(2,2,2)'},... 'FontSize',14,'HorizontalAlignment','center')subplot(2,2,3)plot(t,y2,'--b*','linewidth',2,'markersize',5)text(.5,.5,{'subplot(2,2,3)'},... 'FontSize',14,'HorizontalAlignment','center')subplot(2,2,4)plot(t,y2,'--r*','linewidth',2,'markersize',5)text(.5,.5,{'subplot(2,2,4)'},... 'FontSize',14,'HorizontalAlignment','center')程序编译结果如右图所示

Matlab绘制子图subplot使用攻略

2、例如:复制一下程序到matlab窗口figuret=0:0.001:1;y1=sin(10*t);y2=sin(15*t);y3=sin(20*t); y4=sin(25*t);subplot(2,2,[1 3])plot(t,y1,'--r*','linewidth',2,'markersize',5)subplot(2,2,2)plot(t,y2,'--b*','linewidth',2,'markersize',5)subplot(2,2,4)plot(t,y2,'--r*','linewidth',2,'markersize',5)程序编译结果如右图所示

Matlab绘制子图subplot使用攻略

4、例如:复制一下程序到matlab窗口figuret=0:0.001:1;y1=sin(10*t);y2=sin(15*t);y3=sin(20*t); y4=sin(25*t);subplot(2,2,[1 2])plot(t,y1,'--r*','linewidth',2,'markersize',5)subplot(2,2,3)plot(t,y2,'--b*','linewidth',2,'markersize',5)subplot(2,2,4)plot(t,y2,'--r*','linewidth',2,'markersize',5)程序编译结果如右图所示

Matlab绘制子图subplot使用攻略
  • 怎么用MATLAB解方程
  • matlab怎么打开工作空间
  • matlab中for循环怎么用
  • matlab编辑器怎么调出
  • matlab中怎么输入指数
  • 热门搜索
    肉丸子怎么做好吃 怎么瘦咬肌 貔貅怎么开光 大便出血怎么办 蜻怎么组词 综合评价怎么写 怎么用键盘代替鼠标 半月板损伤怎么治疗 口干舌燥是怎么回事 鲜香菇怎么做好吃