28 lines
957 B
Matlab
28 lines
957 B
Matlab
function Hd = butterworth
|
|
%BUTTERWORTH Returns a discrete-time filter object.
|
|
|
|
% MATLAB Code
|
|
% Generated by MATLAB(R) 23.2 and Signal Processing Toolbox 23.2.
|
|
% Generated on: 27-Mar-2024 18:56:52
|
|
|
|
% Butterworth Bandpass filter designed using FDESIGN.BANDPASS.
|
|
|
|
% All frequency values are in Hz.
|
|
Fs = 44100; % Sampling Frequency
|
|
|
|
Fstop1 = 6300; % First Stopband Frequency
|
|
Fpass1 = 7350; % First Passband Frequency
|
|
Fpass2 = 14700; % Second Passband Frequency
|
|
Fstop2 = 17640; % Second Stopband Frequency
|
|
Astop1 = 50; % First Stopband Attenuation (dB)
|
|
Apass = 1; % Passband Ripple (dB)
|
|
Astop2 = 50; % Second Stopband Attenuation (dB)
|
|
match = 'stopband'; % Band to match exactly
|
|
|
|
% Construct an FDESIGN object and call its BUTTER method.
|
|
h = fdesign.bandpass(Fstop1, Fpass1, Fpass2, Fstop2, Astop1, Apass, ...
|
|
Astop2, Fs);
|
|
Hd = design(h, 'butter', 'MatchExactly', match);
|
|
|
|
% [EOF]
|