fs=100;t = -1:.1/fs:1;y1=sin(2*pi*t);y2=cos(2*pi*t)plot(y1);hold onplot(y2,'r');这样两条曲线就画出来了,为了区分,第二条我用了红色
hold on,之后的绘图操作都会画在当前图上,画完后hold off关闭
x = -pi:.1:pi;plot(sin(x));hold all % hold all是关键plot(sin(x+(pi/4)));