Getting difference in magnitude response of filter using freqz and fvtool by giving inputs as filter coefficients, b, a of iir filter
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Filter Design en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!