Getting difference in magnitude response of filter using freqz and fvtool by giving inputs as filter coefficients, b, a of iir filter
1 次查看(过去 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!