DSPRelated.com
Forums

Autocorrelation matrix with matlab

Started by thom June 29, 2006
Hi

I would like to compute the autocorrelation matrix from a vector with
Matlab. I don't have the statistical signal processing toolbox (I can only
use "cov" and "corrcoef" functions, or build my own function). Could
someone explain how I can do?

Thanks a lot.

Thom
Your input signal vector being X(k), k=0...n, isn't it simply X*X' ?

Regards

stereo


thom wrote:
> Hi > > I would like to compute the autocorrelation matrix from a vector with > Matlab. I don't have the statistical signal processing toolbox (I can only > use "cov" and "corrcoef" functions, or build my own function). Could > someone explain how I can do? > > Thanks a lot. > > Thom
Thank you I've written a Matlab code which seems to work.


>Your input signal vector being X(k), k=0...n, isn't it simply X*X' ? > >Regards > >stereo > > >thom wrote: >> Hi >> >> I would like to compute the autocorrelation matrix from a vector with >> Matlab. I don't have the statistical signal processing toolbox (I can
only
>> use "cov" and "corrcoef" functions, or build my own function). Could >> someone explain how I can do? >> >> Thanks a lot. >> >> Thom > >
Hi,

You can use the CORRMTX function in the signal processing toolbox.


-Ikaro


thom wrote:
> Hi > > I would like to compute the autocorrelation matrix from a vector with > Matlab. I don't have the statistical signal processing toolbox (I can only > use "cov" and "corrcoef" functions, or build my own function). Could > someone explain how I can do? > > Thanks a lot. > > Thom
>thom wrote: >> Hi >> >> I would like to compute the autocorrelation matrix from a vector with >> Matlab. I don't have the statistical signal processing toolbox (I can
only
>> use "cov" and "corrcoef" functions, or build my own function). Could >> someone explain how I can do? >> >> Thanks a lot. >> >> Thom > >
what about >> help xcorr XCORR Cross-correlation function estimates. C = XCORR(A,B), where A and B are length M vectors (M>1), returns the length 2*M-1 cross-correlation sequence C. If A and B are of different length, the shortest one is zero-padded. C will be a row vector if A is a row vector, and a column vector if A is a column vector. XCORR produces an estimate of the correlation between two random (jointly stationary) sequences: C(m) = E[A(n+m)*conj(B(n))] = E[A(n)*conj(B(n-m))] It is also the deterministic correlation between two deterministic signals. XCORR(A), when A is a vector, is the auto-correlation sequence. XCORR(A), when A is an M-by-N matrix, is a large matrix with 2*M-1 rows whose N^2 columns contain the cross-correlation sequences for all combinations of the columns of A. The zeroth lag of the output correlation is in the middle of the sequence, at element or row M.