Re: finding periodicity in a set

• To: mathgroup at smc.vnet.net
• Subject: [mg39271] Re: [mg39250] finding periodicity in a set
• From: Matt Flax <flatmax at ieee.org>
• Date: Fri, 7 Feb 2003 03:07:33 -0500 (EST)
• References: <200302060807.DAA09127@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```It sounds to me like you have the right start.
The temporal methods they use to find pitch is speech processing will
help to take you the rest of the way.

a] Find DFT X=DiscreteFourierTransform[xlist]
b] Auto Correlate the spectra XCORR=Correlate[Abs[X]]
c] Find maximum in XCORR and that is the period

To find the offset or phase .. that is a different story !

Hope that is a little teleporter forward.

Matt

On Thu, Feb 06, 2003 at 03:07:01AM -0500, Scott A Centoni wrote:
> I have a list of coordinates where I want to find the period and offset
> (modulo the period).  To illustrate, let's create the fake data set
>
> xlist = 0.202+1.618(0.001 Random[ ] + Range[3, 17])
>
> I want a function that will return
>
> periodicity[xlist]
>
> {1.618,0.202}
>
> _pace_ an error in the third decimal place.  Note that the order of the
> data in the list is irrelevant; it's to be considered a set, not a vector.
>
> My first thought is to turn this into a sum of delta functions
>
> xfunc = Plus@@(DiracDelta[x-#]&/@xlist)
>
> and then Fourier transform this
>
> kfunc = FourierTransform[xfunc,x,k]
>
> and find the first nontrivial peak.  Does someone have a better way?  Or
> if not, what's the "best" way of locating the peak?
>
> Thanks,
> Scott

--
http://mffm.darktech.org

WSOLA TimeScale Audio Mod  : http://mffmtimescale.sourceforge.net/
FFTw C++                   : http://mffmfftwrapper.sourceforge.net/
Vector Bass                : http://mffmvectorbass.sourceforge.net/
Multimedia Time Code       : http://mffmtimecode.sourceforge.net/

```

• Prev by Date: Re: Trouble with Integrate
• Next by Date: Re: Trouble with Integrate
• Previous by thread: finding periodicity in a set
• Next by thread: Re: finding periodicity in a set