I have a signal of length 'N' which looks like this

[.......p-set...] [SINE-WAVE] [....q-set...]

amplitude of points in p-set << amplitude of points in sine-wave

Sometimes there are a few sparse points in p-set whose amplitude is comparable to sine-wave points. However, number of such points is much less than the length of the sine wave. I want to find the beginning point of the sine-wave.

Clearly I cannot use thersholding as those sparse points will be counted as the beginning of the sine-wave which is wrong.

Is there any effective solution or existing functions? Sliding window may be? Please explain with some code (MATLAB). Due to firewall restrictions I cannot upload image. Sorry.

  • $\begingroup$ Two - I think - important questions: 1. is the frequency of the sine-wave (approximately) known? 2. do those high-amplitude peaks come in bursts or are they usually isolated from each other? $\endgroup$
    – Matt L.
    Mar 20, 2014 at 11:09
  • $\begingroup$ 1.The sine-wave is a chirp signal whose starting and ending freq are known. 2. Yes, the high amplitude peaks come in bursts and are generally isolated from each other $\endgroup$
    – BaluRaman
    Mar 20, 2014 at 11:30
  • 1
    $\begingroup$ In general, the median filter is a good choice for removing spurious spikes from a signal or image. You need a window at least twice the duration of your spikes. $\endgroup$
    – Juancho
    Mar 20, 2014 at 13:16

1 Answer 1


If you know the frequency of the sine signal already, you can correlate your [.......p-set...] [SINE-WAVE] [....q-set...] signal with the sine signal. The correlation will give you a peak where sine wave exactly matches with the signal. Since you know the sine signal length you can figure out the beginning of the sine signal in your original signal. I hope this helps you a bit.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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