u(n) :k=-50:50y=zeros(1,50),ones(1,51)subplot(2,1,1)stem(k,y,.)-50 -40 -30 -20 -10 0 10 20 30 40 5000.10.20.30.40.50.60.70.80.91u(n-n0):k=-50:50n0=10y=zeros(1,50+n0),ones(1,51-n0)subplot(2,1,2)stem(k,y,.)-50 -40 -30 -20 -10 0 10 20 30 40 5000.10.20.30.40.50.60.70.80.91冲击函数:k=-50:50a=zeros(1,50),ones(1,1),zeros(1,50)stem(k,a,.)-50 -40 -30 -20 -10 0 10 20 30 40 5000.10.20.30.40.50.60.70.80.91移位的冲击函数:k=-50:50n=10;a=zeros(1,50+n),ones(1,1),zeros(1,50-n)stem(k,a,.)-50 -40 -30 -20 -10 0 10 20 30 40 5000.10.20.30.40.50.60.70.80.91