MATLAB学习点滴3,MATLAB不是万能的, 但不学习它是万万不行的。,例1. 只绘数据点,输入MATLAB程序如下: x = 0 : pi / 15 : 4*pi; y = exp ( 2*cos ( x ) ); plot ( x, y, r+ ),Output,进一步对图形进行设置: x = 0 : pi / 15 : 4*pi; y = exp ( 2*cos ( x ) ); plot ( x, y, -r , x, y, ok ),Output,Continue,继续对线类型进行设置: x = 0 : pi / 15 : 4*pi; y1 = exp ( 2*cos ( x ) ); y2 = exp ( 2*sin ( x ) ); plot ( x, y1, -*k , x, y2, -.ok ),Output,矩阵的线绘,z = peaks; %矩阵为4949 plot ( z ),Output,Cont.,变换方向来绘图: y = 1 : length ( peaks ); plot ( peaks, y ),Output,用双Y轴绘曲线。,t = 0 : pi/20 : 2*pi; y = exp ( sin ( t ) ); plotyy ( t, y, t, y , plot, stem ),Output,