Matlab方法类_plot函数2D
2017-10-21 本文已影响8人
Luang_watson
plot 作为一种Matlab的语言工具,可以用此来描绘连续的波形变化,是不可以用此来描绘离散类的波形,离散类则有stem函数作为工具。
plot函数可以作为基本的函数入门方式之一,在描绘2D图形过程中基础性突出,可以描绘基本的2D图形。
让我们来简单认识plot函数
1)plot函数规则
plot(y) -----对y的基本的描绘。
如下图:


plot(x,y)、plot(x1,y1,x2,y2) 分别对一个波形和两个波形的描绘。
如下图:


以上利用subplot进行分区域绘图。
subplot 规则 subplot(a,b,c) a=行 b=列 c=序号,以此排序。
2)plot函数加入绘图颜色方式


颜色分别可以利用英文单词的的一个字母表示
b- blue k-black r-red y-yellow g-green
规则: plot(x,y,'r') 也可以对描绘点的符号进行修改plot(x,y,'.')

axis是一种区间分布格式,xy轴两个区间的自定义。
grid on 对网格的使用,也可以grid off 取消网格。

点表示绘图形式
也可以利用plot(x,y,'r-.')/plot(x,y,'b-.')

3)完整的两个函数波形

总结:
学习plot函数是非常基本,上述的也是基本的东西,往往基本的东西都是习惯养成的干货。