I have two signals of say 300 time points. Now I just want to calculate the cross-correlation around an interesting region of time points 100-200.
If I calculate the cross-correlations with a maximum lag of 10 for example with xcorr(A(100:200),B(100:200),10) matlab would pad the ends with zeros for the lagged calculations, but how could I tell it to use the real data instead (A(90:99) or A(201:210))?
Again, I don't want calculate the correlation over the whole time-series, but use the outer data points if needed instead of zero padding.
Maybe a workaround would be to put everything in a loop and generate appropriate A and B series for each lag value....