필터 지우기
필터 지우기

Autocorrelation Matrix from a vector

조회 수: 19 (최근 30일)
xplore29
xplore29 2012년 9월 26일
I have observations of a noisy channel and i form a vector y of length n from those observations. I need to compute the autocorrelation matrix from this vector y which should be just the outer product y*y' i-e E[y*y']=y*y'. This matrix is a rank=1 nxn matrix. Is this correct?

채택된 답변

Wayne King
Wayne King 2012년 9월 26일
편집: Wayne King 2012년 9월 26일
No, that is not correct. The way you are doing it is not giving the autocorrelation matrix. For one thing your matrix is not going to be Toeplitz.
For example:
x = randn(10,1);
rxx = x*x';
Note the above, rxx, is not Toeplitz.
But
[xc,lags] = xcorr(x,x,9,'biased');
r = xc(10:end);
rxx = toeplitz(r,conj(r)); % the conj() of course here is not needed
Now, rxx is Toeplitz and not that the autocorrelation matrix has full column rank.
rank(rxx)
Or you could do:
X = fft(x,2^nextpow2(2*size(x,1)-1));
R = ifft(abs(X).^2);
m = length(x);
R = R./m; % Biased autocorrelation estimate
rxx = toeplitz(R(1:length(x)),conj(R(1:length(x))));

추가 답변 (1개)

xplore29
xplore29 2012년 9월 27일
Thank you.
In case of cross correlation between y(nx1) and x(mx1) (n>m) vectors
rxy is a nxn matrix and following code should work
[xc,lags] = xcorr(y,x,n-1); r = xc(n:end); rxy = toeplitz(r,conj(r)); % the conj() of course here is not needed
but the true X-correlation matrix is T (nxm) matrix
T = rxy(:,1:m);
Is this correct?

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by