Lab 9
Lab 9
LAB 09:
OBJECT: To understand properties and operation of convelation.
CODE:
x=[1 -1 2 0 -1 0 0 0]
nx=[0:7]
y=xcorr(x,x)
xy=-7:7
stem(xy,y)
RESULT:
7
-1
-2
-3
-8 -6 -4 -2 0 2 4 6 8
CODE:
x=[1 -1 2 0 -1 0 0 0]
nx=[0:7]
E=sum(abs(x).^2)
RESULT:
E =
7
Task 4: Compute cross convelation of the given sequence
CODE:
x=[0 0 1 0 2 0 0 -1 0]
y=[0 0 1 0.8 0.6 0 0 0 0]
nx=[0:8]
ny=[0:8]
y=xcorr(x,y)
xy=-8:8
stem(xy,y)
RESULT:
2.5
1.5
0.5
-0.5
-1
-8 -6 -4 -2 0 2 4 6 8