AUTOCORRELATION
#1

Procedure:-
1. Read the input sequence
2. Autocorrelate the signal using xcorr(x,x)
3. Display the Autocorrelation result in suitable axis
4. verify the correlation property:Rxx(0)=energy(x)
5. verify the property :Rxx is an even function
MATLAB program for autocorrelation
Code:
clear
clc
close all

% READ THE INPUT SIGNAL
x = [1 2 1 1];
%Define the axis
n = 0:1:length(x)-1;
% PLOT THE SIGNAL
subplot(2,1,1);
stem(n,x);
xlabel('n--->');
ylabel('x--->');
title('sequence x');
grid on;

% AUTOCORRELATE THE SIGNAL
Rxx = xcorr(x)
% AXIS FOR THE AUTOCORRELATION RESULT
nRxx = -length(x)+1:length(x)-1
% Display the result
subplot(2,1,2);
stem(nRxx,Rxx);
xlabel('nRxx--->');
ylabel('autocorrelation of x--->');
title('Autocorrelated sequence of x');
grid on;

%% VERIFICATION OF THE AUTOCORRELATION PROPERTIES
% PROPERTY-1: RXX(0) GIVES THE ENERGY OF THE SIGNAL
% Energy OF THE SIGNAL = SUM(SQUARES OF X)
Energy = sum(x.^2);
% GET THE INDEX OF THE CENTER VALUE
center_index = ceil(length(Rxx)/2)
% ACCESS CENTER VALUE RXX(0)
Rxx_0 = Rxx(center_index)
% CHECK IF THE RXX(0) = ENERGY
if (Rxx_0 == energy)
    disp('Rxx(0) gives energy -- propert-1 is proved');
else
    disp('Rxx(0) gives energy -- propert-1 is not proved');
end

% PROPERTY-2: RXX IS EVEN
Rxx_Right = Rxx(center_index:1:length(Rxx));
Rxx_Left = Rxx(center_index:-1:1);
if Rxx_Right == Rxx_Left
    disp('Rxx is even');
else
    disp('Rxx is not even');
end

RESULT:- AUTOCORRELATION
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: autocorrelation matlab code download, helio disp lay**speaking course wiki, matlab codings for autocorrelation and crosscorrelation of pn sequences, autocorrelation in vhdl, code for autocorrelation, gender recognition applications using autocorrelation method, linear prediction autocorrelation,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: