# 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? – Jim Clay Apr 15 '13 at 14:15
• Can u put a picture up? – Spacey Apr 15 '13 at 14:54
• the sampling rate is 16000 you can see pic in following link: researchgate.net/… – Ali Bodaghi Apr 16 '13 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? – mbaitoff May 19 '13 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. – Ali Bodaghi May 20 '13 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$.