先上代码,后出结果图. a. n = [-5:5]; x=2*impseq(-2,-5,5) - impseq(4,-5,5); set(gcf,'Color',[1,1,1]) % 改变坐标外围背景颜色 stem(n,x); title('Sequence in Problem 2.1a'); xlabel('n'); ylabel('x(n)'); grid on; b. n = [0:20]; x1 = n .* (stepseq(0,0,20) - stepseq(10,0,20));…