How to check the freqeuncy response of a boxcar filter?
19 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Chunru
2023-8-15
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!