?? notch1.m
字號:
%
% notch1.m - Magnitude response of a notch filter
% with both zeros and poles
%
w0=0.2*pi; th0=w0; r=0.85; % Define constants
% Define the transfer function H(z)
b(1)=1; b(2)=-2*cos(w0); b(3)=1;
a(1)=1; a(2)=-2*r*cos(th0); a(3)=r*r;
% Calculate the magnitude response of H(z)
[h,w]=freqz(b,a,128); mag=20*log10(abs(h));
% Plot the magnitude response of H(z)
plot(w/pi/2,mag,'b-');
xlabel('Normalized frequency');
ylabel('Magnitude (dB)');
title('Magnitude response of transfer function H(z)');
grid;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -