Xcorr versus Correlation through toeplitz matrix
Started by 7 years ago●2 replies●latest reply 7 years ago●507 viewsI'm not quite sure that I understand your question here.
A cross correlation is a measure of the similarity of to series. It is often referred to as a sliding dot product, and in fact, is very similar to a convolution (in fact, if you flip one of your signals w.r.t time - i.e. f(t) -> f(-t), then it is exactly a convolution). In DSP it is often used as method of searching a longer signal for segments of another smaller signal.
If you do a cross correlation of M signals with length N, you'll come up with an (M+N-1)x(M+N-1).
A Toeplitz, is by definition, a square matrix. It is simply, a matrix with each diagonal (going upper left to lower right - referred to descending diagonals) a constant. That is to say, A0,0, = A1,1 = A2,2, ... Am,m, AND A0,1 = A1,2 = A2,3... etc... So, performing a cross correlation on it, you'll get a 2m-1x2m-1 matrix.
hope this helps,
Hi Moldy01
I appreciate your response and I will try to clarify my query. I am using MATLAB for studying correlations. and came upon a query while seeing two ways of calculating inner products of "M" vectors.
Lets say we have 2 x vectors (M=2) of length N each. For their inner product space, we can have a matrix of size (NxM) that we start with, and use xcorr command of MATLAB to get a (2N-1) x M^2 as a result of their correlations, each M column representing either a auto-correlation or cross-correlation of the vector with itself or the other, respectively. Hence we have M^2 columns. Each length of the result will have the number of lags from each of the vector length, hence (2N-1) rows.
Another way to do this could be using a Toeplitz matrix, so that for each vector, we have a toeplitz matrix, size (2N-1) x M^2, with the elements as you have said. Now I concatenate the 2 vectors to form a matrix with size (2n-1)x 2NM, with first M columns representing the first vector and second M column representing second vector. Simply multiplying this matrix with its conjugate (assuming the vectors are complex) I get a matrix size 2NM x 2NM, with all possible inner products.
However, the elements in this matrix will be repeated as all diagonal terms will be equal, representing similar lags in each multiplication operations.
Now my actual query is; is there a way to take out the correlation terms from this result of Toeplitz Matrix multiplication result? Is there a relationship between the correlations and convolution done through this two different procedures?
Cheers and Regards
Sal