- #1
Ophyron
- 1
- 0
hi,
i'm pretty new to MATLAB - but I've been using it to perform FFT's on .wav files to graph frequency and amplitude. I've been using the following code to generate the graphs:
is there any way i can find the frequency at which peaks appear, and the amplitude of these peaks with code? I'm only really interested in the peaks in the first 5000Hz or so, above about 20dB. anyone got any ideas? any pointers would be much appreciated! thanks
take care
Nick
i'm pretty new to MATLAB - but I've been using it to perform FFT's on .wav files to graph frequency and amplitude. I've been using the following code to generate the graphs:
Matlab:
[h,Fs] = wavread('x.wav');
H = fft(h);
N = length(h);
f = (0:(N-1))*(Fs/N);
t = (0:(N-1))/Fs;
figure(1);
clf;
plot(f,20*log10(abs(H)));
grid;
xlabel('Frequency (Hz)');
ylabel('Amplitude (dB)');
is there any way i can find the frequency at which peaks appear, and the amplitude of these peaks with code? I'm only really interested in the peaks in the first 5000Hz or so, above about 20dB. anyone got any ideas? any pointers would be much appreciated! thanks
take care
Nick
Last edited by a moderator: