How to check the freqeuncy response of a boxcar filter?
24 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I am performing a lowpass filtering with two different filters. a) window i.e. box car b) butter filter. For butter, I know how to see the frequency response, but how to see the freqeuncy response of boxcar filter?
clear all; clc;
fs =2000;
fc =20/(fs/2);
N = 1/fc;
h = boxcar(N); % 1/N = fc
h = h/sum(h);
%filtered_signal = filtfilt(h, 1, signal));
butter
clc; clear all;
fs = 2000;
filtorder = 6; bw_butter =20;
[bcoeff,acoeff] = butter(filtorder,bw_butter/fs*2);
figure()
freqz(bcoeff,acoeff,[],fs)
xlim([0 200])
%filtered_signal = filtfilt(bcoeff,acoeff, signal));
0 commentaires
Réponses (1)
Chunru
le 15 Août 2023
clear all; clc;
fs =2000;
fc =20/(fs/2);
N = 1/fc;
h = boxcar(N); % 1/N = fc
h = h/sum(h);
bcoeff = h;
acoeff = 1;
freqz(bcoeff,acoeff,[],fs)
%xlim([0 200])
0 commentaires
Voir également
Catégories
En savoir plus sur Analog Filters dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!