玖叶教程网

前端编程开发入门

Matlab绘制多子图示例,方便对比查看

接上文:Matlab精彩画图示例:绘制图上图

用Matlab画图时,除了借助图上图来对比查看,还可以借助多子图来对比查看。

绘制多字图的关键命令:subplot

subplot(m, n, p) divides the current figure into an m-by-n grid and creates axes in the position specified by p.

1、纵向对比多子图

Matlab代码如下:

程序运行结果:

2、横向对比多子图

Matlab代码如下:

程序运行结果:

3、交叉对比多子图

Matlab代码如下:

程序运行结果:

需要注意的是,用subplot将当前figure分成 m x n 个坐标轴时,坐标轴的计数是以行优先的。

The first subplot is the first column of the first row, the second subplot is the second column of the first row, and so on.

相关阅读

Matlab精彩画图示例:曲线族

Matlab学习总结:基础命令、可视化、算法示例等

发表评论:

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言