0% found this document useful (0 votes)
34 views4 pages

Azhar Sayyed Ss

This document illustrates cross correlation and auto correlation through two examples of each. In the cross correlation examples, the cross correlation of two signals x(n) and y(n) is calculated and plotted. In the auto correlation examples, the auto correlation of a single signal x(n) is calculated and plotted. Both examples show the correlation plotted against time index n to visualize the correlation function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views4 pages

Azhar Sayyed Ss

This document illustrates cross correlation and auto correlation through two examples of each. In the cross correlation examples, the cross correlation of two signals x(n) and y(n) is calculated and plotted. In the auto correlation examples, the auto correlation of a single signal x(n) is calculated and plotted. Both examples show the correlation plotted against time index n to visualize the correlation function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 4

EXPERIMENT NO 06 : EXPLANATION

ILLUSTRATE OF CROSS CORRELATION AND AUTO CORRELATION

PROGRAMME 1 : CROSS CORRELATION

EXAMPLE 1:

Given x(n)and y(n), find cross corelation

>>x=[ 1 2 -3 -2 4];

>> y=[-2 3 1 -1 3];

>> r=conv(x,fliplr(y))

r=

3 5 -10 2 15 -19 4 16 -8

>> n=0:8;

>> stem(n,r)

>> xlabel('Time index n')

>> ylabel('Amplitude')

>> title('Cross Correlation')


Cross Correlation
20

15

10

5
Amplitude

-5

-10

-15

-20
0 1 2 3 4 5 6 7 8
Time index n

EXAMPLE 2:

x=[1 -2 3 -4 5];

y=[1 0 2 3 4];

>> r=conv(x,fliplr(y))

r=

4 -5 8 -11 15 5 13 -4 5

>> n=0:8;

>> stem(n,r)

>> xlabel('Time index n')

>> ylabel('Amplitude')
>>title('Cross Correlation')

Cross Correlation
15

10

5
Amplitude

-5

-10

-15
0 1 2 3 4 5 6 7 8
Time index n

PROGRAMME 2: AUTO CORRELATION

x=[1 -2 3 -4 5]

x=

1 -2 3 -4 5

>> r=conv(x,fliplr(x))

r=
5 -14 26 -40 55 -40 26 -14 5

>> n=0:8;

>> stem(n,r)

>> xlabel('Time index n')

ylabel('Amplitude')

>> title('Auto correlation')

Auto correlation
60

50

40

30

20
Amplitude

10

-10

-20

-30

-40
0 1 2 3 4 5 6 7 8
Time index n

You might also like