Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm working on some numerical analysis problem, and I'm studying functions that "seem" to be periodic. Now what I would like to do, is to determine their period. Only, the methods I actually use are extremely childish (I visually find two points where the function intercepts the abscissa axis, get the coordinates and calculate the difference between them...).

In other words :

Given a function $\ f(t)\ |\ t\in\ [0,t_f]$

I would like to find $\{T,\ T>0\}$ so that $\forall\, t,\ f(t+T)=f(t)$

Does anyone have a solution?

Thanks in advance.

share|improve this question
add comment

3 Answers 3

up vote 2 down vote accepted

The quick and dirty answer is to take a Fourier transform of your function and observe where, if any, there are spikes in the transform. The frequencies at which the transform has spikes represents the $2 \pi/p$, where $p$ is a period of the data.

In reality, you won't have spikes but a set of peaks. There is a thorough treatment in Numerical Recipes that treats the problem statistically by computing something called a Lomb Periodogram. (The reference is in Sec. 13.8 of NR.) In this case, the LP answers the question of how high a peak should be in order that it represents a true period of the function.

share|improve this answer
add comment

Your best bet is to use a Fourier Transform of the data, and looking for the fundamental frequency by looking for the lowest peak in the transform. The following public domain image shows what you get:

enter image description here

share|improve this answer
add comment

This type of questions is answered by the Autocorrelation (ACF).

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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