# Find the time lag for a wave

suppose that we have a wave which has some peaks in some indexes like 2,12,25,... and otherwise zero.

I want to extract the time lag or lags between peaks of a signal. could anyone help me ?

• Do you know the sample rate? Commented Apr 15, 2013 at 14:15
• Can u put a picture up? Commented Apr 15, 2013 at 14:54
• the sampling rate is 16000 you can see pic in following link: researchgate.net/… Commented Apr 16, 2013 at 1:07
• @AliBodaghi: do you want to find the peaks on the image, or in the sequence of numbers? could you provide the sequence in simple text form? Commented May 19, 2013 at 8:25
• I want to find time lag to remove other spurious peaks. you can suppose some high peaks with special distance from each other with some other random and weak peaks between 2 high peaks. Commented May 20, 2013 at 3:03

The time lag is equal to the index difference times the sample period. The sample period is: $$T_s = \frac{1}{f_s} = \frac{1}{16000} = 62.5\mu s$$ Thus, the time lag from the first peak to the second is $(12 - 2) * T_s = 625\mu s$. The time lag from the second peak to the third is $(25 - 12) * T_s = 812.5\mu s$.

• Thanks for your respond. However, my question is removing the spurious peaks as you seen in Figure part B by using time lag between peaks. Commented Apr 18, 2013 at 1:13