I am trying to measure the frequency response of acoustic filter. I sample the sound before propagation in the filter and after by 2 different mics. And now I am trying to find the system (the acoustic path) frequency response.
Using matlab how can I do it?
- I tried the identification app but the result is not so reliable and fails if the signal is changed.
- I tried $\displaystyle\rm H=\frac{\lvert FFT(output)\rvert}{\lvert FFT(input)\rvert}$ but the result is bad too.
UPDATE: After running this code:
[y, Ss] = audioread('4.wav');
h = fir1(30,0.2,rectwin(31));
y_f = filter(h,1,y);
[Txy,f] = tfestimate(y,y_f);
figure;
plot(f,mag2db(abs(Txy)))
What I doing wrong?
