t=0:0.1:10;%设定t的范围 f=3-exp(t); plot(t,f)
t=-1:0.001:10;t0=0;u=stepfun(t,t0);plot(t,u)axis([-2 12 -0.5 1.5])