matlab 和octave学习笔记之,如何画图表 plot()函数的简单介绍
画图命令plot(x,y)
例子:
>> t = [0:0.2:15];
>> y = sin(pi*t);
>> plot(t,y)
>>
图片
在图表上再画一条线
>> hold on;
>> y2 = cos(pi*t)
>> plot(t, y2, 'r') %'r' rea line
添加xy轴标签, 标题和每天线的解释(legend)
>> xlabel('time')
>&.
原创
2020-07-21 15:57:19 ·
803 阅读 ·
0 评论