?? cw1.m
字號:
%discrete-time forier trasnform computation
%read in the desired lenght dtft
k = 255
%seat in numerator and denumerator coefficiencs
num =[0.0518 -0.1553 0.1553 0.0518]
den =[1 1.282 1.0388 0.341]
%compute the frequency responce
w=0:pi/k:pi;
h=freqs(num,den,w);
%plot the frequency responcs
subplot(2,2,1)
plot(w/pi,real(h));grid
title('real part')
xlabel('\omega/\pi');ylabel('amplitude')
subplot(2,2,2)
plot(w/pi,imag(h));grid
title('imaginary part')
xlabel('\omega/\pi');ylabel('amplitude')
subplot(2,2,3)
plot(w/pi,abs(h));grid
title('magnitude spectrum')
xlabel('\omega/\pi');ylabel('magnitude')
subplot(2,2,4)
plot(w/pi,angle(h));grid
title('phase spectrum')
xlabel('omega/\pi');ylabel('phase,radians')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -