I have a discrete signal: $x=[i_1, i_2, ..., i_n]$
I would like to do the cross correlation between sub-groups of (k number of) consecutive number of $x$, for example:
$xcorr([i_1, i_2, ..., i_k], [i_2, i_3, ..., i_{k+1}])$
What is the most efficient way to do this, computationally? I have been thinking of FFT all subgroup and multiply them, but it's not very efficient. Do you think I can FFT the top-hat window (as dividing into sub-group) and multiply the corresponding sinc function with the FFT(x)? If so, how to do it correctly?