Clear Filters
Clear Filters

Autocorrelation function without using xcorr

10 views (last 30 days)
Joao
Joao on 14 Nov 2014
Hello, I have this code trying to plot the autocorrelation of signal E1 without xcorr function
E1f=[E1 zeros(1,1249)];
for L = 0:length(E1)
for j = 1 : length(E1)
Rxx(j) = (E1f(j)*E1f(j+L));
end
Rxx_sum(L+1) = sum(Rxx);
Rxx = 0;
end
t1=0:1:length(E1);
plot(t1,Rxx_sum);
However i don't the same result using xcorr. E1 is a vector of complex numbers and has a length of [1,1249]
What am I doing wrong?

Answers (0)

Community Treasure Hunt

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

Start Hunting!