hi,(adsbygoogle = window.adsbygoogle || []).push({});

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:

[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

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab - finding peaks

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for Matlab finding peaks | Date |
---|---|

Unexpected result of the "find" command in Matlab | Feb 19, 2015 |

How to find all pairs, triplets, etc in MatLab? | Sep 24, 2014 |

MATLAB : How to find the line of best fit through a binary image? | Jun 30, 2014 |

[Matlab] Can't find inputdlg.m file | Jun 16, 2014 |

MATLAB How to find covariance matrix of 3 or more vectors in matlab? | Aug 16, 2013 |

**Physics Forums - The Fusion of Science and Community**