Effacer les filtres
Effacer les filtres

How to find repetitive patterns using autocorrelation

7 vues (au cours des 30 derniers jours)
Naveen Francis
Naveen Francis le 13 Juin 2011
My aim is to find repetitive patterns in an audio clip. I need to find one 'bar' of audio and I think autocorrelation should do justice. But just how do I go about this? I'm not sure what to do after using the xcorr function. For eg, in a simple case where the values could be x=[1 2 3 1 2 3 1 2 3], and ac=xcorr(x); what do I do next to extract just [1 2 3]?

Réponses (1)

Jason Kaeding
Jason Kaeding le 6 Juil 2011
Wouldn't you see spikes in your xcorr result corresponding to the period of the signal? If you can find the spacing (N) between two spikes, then you would just extract x(1:N) where N is your period length. You might need to shift (1:N) depending on the location of your reference spike.
You would have to define some rules/math to determine where the "spikes" are.

Catégories

En savoir plus sur Acoustics, Noise and Vibration dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by