⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notch1.m

📁 用于DSK5416的程序
💻 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;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -