Pages

Showing posts with label AUTO-CORRELATION. Show all posts
Showing posts with label AUTO-CORRELATION. Show all posts

Friday, December 10, 2010

MATLAB PROGRAM FOR AUTO-CORRELATION (DIGITAL SIGNAL PROCESSIING)


clear all;
x=input('enter the sequence x=');
N=length(x);
y=x;
z=x;
for i=1:N-1
    for i=N-1:-1:1
        x(i+1)=x(i);
    end
    x(1)=0;
    z=[z; x];
end;
m=[z]*[y'];
m=m/N
stem(m);
title('auto-correlation');
xlabel('time index');
ylabel('amplitude');