Getting difference in magnitude response of filter using freqz and fvtool by giving inputs as filter coefficients, b, a of iir filter
조회 수: 2 (최근 30일)
이전 댓글 표시
Getting difference in magnitude response of filter using freqz and fvtool by giving inputs as filter coefficients, b, a of iir.
Can you please tell the difference when both functions are used to get magnitude response.
Below is the design
fs= 50e3; %sampling freq
cutOff= 5;
order = 3;
t=0:1/fs:1-(1/fs);
Sig=sin(2*pi*200*t)+sin(2*pi*150*t);
noise=2*rand(size(t))+sin(2*pi*1*t)+sin(2*pi*5*t)+sin(2*pi*3*t)+sin(2*pi*7*t)+sin(2*pi*11*t)+sin(2*pi*0.5*t)+sin(2*pi*0.2*t);
noisySig = Sig+noise;
wn= 2*cutOff/fs;
[B, A] = butter(order,wn,'high');
freqz(B,A);
fvtool(B,A); %%Freq response of filter
filteredData=filtfilt(B,A,noisySig);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!