Removing empty/low amplitude part from signal

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.

• 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? – Matt L. Mar 20 '14 at 11:09
• 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 – BaluRaman Mar 20 '14 at 11:30
• 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. – Juancho Mar 20 '14 at 13:16