This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
DSP/TP3_8/DiogoEliseu_TP3_8_butterwor...

28 lines
993 B
Matlab

function Hd = DiogoEliseu_TP3_8_final_filter
%DIOGOELISEU_TP3_8_FINAL_FILTER Returns a discrete-time filter object.
% MATLAB Code
% Generated by MATLAB(R) 9.8 and Signal Processing Toolbox 8.4.
% Generated on: 31-Dec-2020 19:24:38
% Butterworth Bandpass filter designed using FDESIGN.BANDPASS.
% All frequency values are in Hz.
Fs = 44100; % Sampling Frequency
Fstop1 = 2850; % First Stopband Frequency
Fpass1 = 3020; % First Passband Frequency
Fpass2 = 7000; % Second Passband Frequency
Fstop2 = 7150; % Second Stopband Frequency
Astop1 = 96; % First Stopband Attenuation (dB)
Apass = 1; % Passband Ripple (dB)
Astop2 = 104; % 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]