0

In a spectrogram, I have a set of harmonic frequencies (peaks in the spectrum) for a given time frame:

5215
3008.1
2428.1
2214.9
1630.2
1315
997.01
881.39
779.04
667.47
554.21
445.77
336.39
237.69
124.6

If I do -diff(ans), I get the differences between the formants, which hint me to the fact that the fundamental frequency f_0 of this frame is around 110 Hz:

2206.9
580.06
213.11
584.72
315.24
317.97
115.62
102.35
111.57
113.26
108.44
109.38
98.705
113.08

It is clear that the last 9 values of the first list are harmonics of the same f_0, because the last 8 values of the second list are around the same value. Their mean is 109.05 (but I'm not sure if that is the correct f_0). How can I calculate f_0 in a neat function?

buzjwa
  • 2,632
  • 2
  • 24
  • 37
Lewistrick
  • 2,649
  • 6
  • 31
  • 42
  • Computing the standard variation with `std` is just as important as computing the average. This will give you a measure of your result's accuracy. Beyond this, what further calculation do you think is required here? – buzjwa Apr 18 '14 at 15:12
  • http://www.mathworks.com/help/signal/ug/estimating-fundamental-frequency-with-the-complex-cepstrum.html – Cici Apr 18 '14 at 15:41

1 Answers1

0

I found an answer myself: I calculate the difference between the two peaks with the lowest frequency values and with energy values above a certain threshold. Then, I check if that difference is (within a certain range) in the list of frequencies.

Lewistrick
  • 2,649
  • 6
  • 31
  • 42