?? ex021000.m
字號(hào):
% Matlab Example 2.10; Chapter 2%a=[1,-1,0.9];b=1;% Part a)x=impseq(0,-20,120);n=[-20:120];h=filter(b,a,x);subplot(2,1,1);stem(n,h)axis([-20,120,-1.1,1.1])title('Impulse Response');xlabel('n');ylabel('h(n)')%% Part b)x=stepseq(0,-20,120);s=filter(b,a,x);subplot(2,1,2);stem(n,s)axis([-20,120,-.5,2.5])title('Step Response');xlabel('n');ylabel('s(n)')%%print -deps2 ex021000.eps%% Part c)sum(abs(h))z=roots(a);magz=abs(z)subplot
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -