gusucode.com > 《精通matlab 7》包括配套光盘 > 配套光盘里的程序附件/Ex-23/Ex2329.m

    %例23-29 阶梯图
t=0:0.5:10;
y=exp(-0.2*t).*cos(t);
stairs(t,y)
hold on
plot(t,y,'r')