How to check the freqeuncy response of a boxcar filter?
조회 수: 22 (최근 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!