I have a data set consisting of measurements of an $n$-dimensional vector $\mathbf{x}(t)$, at $N$ distinct time points $t_i$. The time points $t_i$ are equally spaced.

I need to find the dominant periodicities of this data. That is, I need to estimate a value of $T$ such that $\mathbf{x}(t)$ and $\mathbf{x}(t + T)$ are similar throughout the data (maybe there are multiple such "dominant periodicities" $T$).

How can I do this in Mathematica?

  • 1
    $\begingroup$ Look at the peaks of Total /@ ListCorrelate[data, data, 1]? $\endgroup$
    – user484
    Commented Dec 22, 2014 at 14:20
  • $\begingroup$ The new MMA function FunctionPeriod might be of help. $\endgroup$
    – bbgodfrey
    Commented Dec 22, 2014 at 14:32

1 Answer 1


Since the vector itself has a periodicity, then the individual scalar components should also have the same periodicity. So, if we FT one of the scalar components, it's FT should have peaks at the dominant frequencies. Or, for added signal to noise ratio, we can add the squares of the absolute values of the FT's of the components in time.

As an example, here's a vector with a period of 1.3, plus random noise:

Δt = 0.2;
T = 3000.;
list = Table[
   Sin[2 π t/1.3 + 2.8] {1, 2, -3, 4} + 
    RandomReal[{-0.5, 0.5}, 4], {t, Δt, T, Δt}];

Now take the FT of the individual components in time, absolute value them, square them, and add them, and plot:

ftlist = Plus @@ (Abs[Fourier /@ (list\[Transpose])]^2);
ListLinePlot[ftlist, PlotRange -> All]

enter image description here

Now, convert the peak index into period, recovering the 1.3 we originally used (up to quantization error):

T/(Last[Ordering[ftlist[[1 ;; 4000]]]] - 1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.