Algorithms to find average distance between data maxima I'm having trouble figuring out a way to analyze some simple data. When graphed, the data I have make a somewhat sinusoidal curve. What I want to do is to find the x-values of the maximum peaks of the sinusoidal curve. I then want to subtract each of these x-values from the last peak found and average these differences to obtain an average distance between peaks. Is there an easy way to do this with Excel, Mathematica, or MatLab (the programs I have available to me?).

Thanks in advance!!!
The first technique that comes to mind is cubic spline interpolation, which is good at approximating sinusoidal functions without suffering from Runge's phenomenon. Here's a visual of cubic splines applied to a similar problem:

 

Matlab has an implementation documented here.

Once you have a representation for the underlying function you should be able to find the local maxima easily and take the differences you are looking for.