function Hd = bandstop2500 %BANDSTOP2500 Returns a discrete-time filter object. % MATLAB Code % Generated by MATLAB(R) 9.9 and Signal Processing Toolbox 8.5. % Generated on: 24-Mar-2021 17:32:55 % Elliptic Bandstop filter designed using FDESIGN.BANDSTOP. % All frequency values are in Hz. Fs = 8192; % Sampling Frequency Fpass1 = 2000; % First Passband Frequency Fstop1 = 2300; % First Stopband Frequency Fstop2 = 2700; % Second Stopband Frequency Fpass2 = 3000; % Second Passband Frequency Apass1 = 0.5; % First Passband Ripple (dB) Astop = 60; % Stopband Attenuation (dB) Apass2 = 1; % Second Passband Ripple (dB) match = 'both'; % Band to match exactly % Construct an FDESIGN object and call its ELLIP method. h = fdesign.bandstop(Fpass1, Fstop1, Fstop2, Fpass2, Apass1, Astop, ... Apass2, Fs); Hd = design(h, 'ellip', 'MatchExactly', match); % Get the transfer function values. [b, a] = tf(Hd); % Convert to a singleton filter. Hd = dfilt.df2(b, a); % [EOF]