Help on plotting amplitude ratio vs frequency for audio signal from impedance tube

5 views (last 30 days)
Hi, I have a case where my intension is to find the amplitude RATIO vs frequency from 2 audio signals from the impedance tube.
So far I have tried to input the signals from impedance tube using audiorecorder, record the data using getaudiodata, convert to freq based data using abs(fft()).
My question is what function do I use to find the ratio of amplitudes and how do I do it.
Thanks and regards,
Vijay. V

Accepted Answer

Walter Roberson
Walter Roberson on 12 Feb 2011
This is problematic because frequencies that are not present will have fft magnitudes that are quite close to zero (or perhaps even zero). Inconsequential random noise could result in very large ratios. Thus, you may wish to do some filtering first, perhaps setting very small components to zero. And you are going to have to decide what ratio you expect if one or both components are 0.
If the data length is the same, then you can use the ./ (element-wise division) to construct the ratios. Otherwise, you may wish to interp() to the same frequency and extract the shorter length from each and take the ratios of those.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!