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 ?

enter image description here

  • $\begingroup$ Do you know the sample rate? $\endgroup$
    – Jim Clay
    Apr 15, 2013 at 14:15
  • 2
    $\begingroup$ Can u put a picture up? $\endgroup$
    – Spacey
    Apr 15, 2013 at 14:54
  • $\begingroup$ the sampling rate is 16000 you can see pic in following link: researchgate.net/… $\endgroup$ Apr 16, 2013 at 1:07
  • $\begingroup$ @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? $\endgroup$
    – mbaitoff
    May 19, 2013 at 8:25
  • $\begingroup$ 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. $\endgroup$ May 20, 2013 at 3:03

1 Answer 1


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$.

  • $\begingroup$ 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. $\endgroup$ Apr 18, 2013 at 1:13

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.