Code covered by the BSD License
by Atsushi Matsumoto
04 Nov 2011
MATLAB EXPO 2011 Signal Processing Workflow Demo Files
function Hd = design_notch_fcn(Fnotch,BW,Apass)
%DESIGN_NOTCH_FCN Returns a discrete-time filter object.
% MATLAB Code
% MATLAB(R) 7.12 DSP System Toolbox 8.0 ɂĐ܂B
% : 06-Jul-2011 13:45:48
% IIR Notching filter designed using the IIRNOTCH function.
% All frequency values are in Hz.
Fs = 22050; % Sampling Frequency
% Fnotch = 2842.4; % Notch Frequency
% BW = 50; % Bandwidth
% Apass = 10; % Bandwidth Attenuation
[b, a] = iirnotch(Fnotch/(Fs/2), BW/(Fs/2), Apass);
Hd = dfilt.df2(b, a);