MATLAB: Reading, writing and processing .wav files in Matlab

frequencywav

Im on a school project and my problem is that I have a .wav file and I want to find the highest Db vs. frequency (Hertz) in that file. I'm measuring what frequency will sound (in the human ear) the highest. So I need a plot Db vs. frequency.
any idea?

Best Answer

The fft function will do what you want, although you have to specify the magnitude of the fft in dB. The documentation for fft has the essential code between the first two figures in the documentation. You will need the log10 function to calculate dB from the magnitude.