Autocorrelation Matrix from a vector

H
Harper · Mar 4, 2021 · 2K views
Question
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?  
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 17, 2026
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))));
 
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!