The result of a cross-correlating a signal of deltas (period N) with a signal of white noise that's containing a periodic signal (of period N, Length and Position) is plotted in the image. I want to find the indices of x1 and x2 shown in the image. I can find the position from findpeaks in Matlab but I want to clip to this large blob in the resulting signal due to cross-correlation.
I have tried variance, some filters and I have reduced it to a peak. but I haven't found an accurate way to find x1 and x2 ( because at the end: the difference between the highest peak and any of them is the length of the signal which I'm interested in).