Getting difference in magnitude response of filter using freqz and fvtool by giving inputs as filter coefficients, b, a of iir filter

조회 수: 3 (최근 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개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by