Designing a discrete signal with cutoff frequencies
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jonathan George
am 26 Mär. 2022
Beantwortet: Star Strider
am 26 Mär. 2022
How would I go about designing a 4th order band stop discrete filter that is designed to filter signals sampled at 10Hz and with cutoff frequencies of 2.65Hz and 3.3Hz using the FIR window approach?
Many thanks.
1 Kommentar
AndresVar
am 26 Mär. 2022
do you have the filter designer app? Introduction to Filter Designer - MATLAB & Simulink Example (mathworks.com)
Akzeptierte Antwort
Star Strider
am 26 Mär. 2022
Fs = 10; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency
order = 4;
Fp = [2.65 3.3]; % Passband Frequency Vector
h = fir1(order, Fp/Fn, 'bandpass');
figure
freqz(h, 1, 2^16, Fs)
The order is too low for it to actually have a bandpass characteristic. Increasing the order shows it correctly —
Fs = 10; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency
order = 12;
Fp = [2.65 3.3]; % Passband Frequency Vector
h = fir1(order, Fp/Fn, 'bandpass');
figure
freqz(h, 1, 2^16, Fs)
.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!