LAB2
LAB2
Student Name:
Reg. No. :
Date :
Signature :
Objectives:
A) What is meant by LTI systems? And prove that y = conv(x,y) in any LTI
systems where:
x ----> input signal
y ----> output signal
h ----> inpulse response signal
Procedure:
Save the file in current folder, LAB2, with the name conv_m.m
Try the following commands in command window and check the results:
x = [3 11 7 0 -1 4 2];
nx = -3:3;
h = [2 3 0 -5 2 1];
nh = -1:4;
[y,ny] = conv_m(x,nx,h,nh)
x = [1 1 1 1 1];
nx = [-2:2];
h = [1 1 1 1 1 ];
nh = [-2:2];
[y , ny] = conv_m(x,nx,h,nh);
subplot(3,1,1), stem(nx,x),title('x(n)');
subplot(3,1,2), stem(nh,h),title('h(n)');
subplot(3,1,3), stem(ny,y),title('y(n)');
Save the file in current folder, LAB2, with the name conv_rep.m
Q) Draw the signals x(k) & h(-k+n) for n = 0, -1, 1 and calculate y(0), y(-1), and y(1)?
Step3: Sequense correlations (15 Minutes):
it's an operation used in many applications of digital signal processing, it's a measure of the degree to
which two sequences are similar, given two finite energy signals x(n) and y(n), the correlation between
the two signal is defined as:
if we compare the convolution operation with the above equation of correlation, observe a close
relevance.
%%
[x,nx] = sigfold(x,nx); % x(-n)
[rxy, nrxy] = conv_m(y,ny,x,nx); % Cross-correlation
subplot(3,1,3);
stem(nrxy,rxy), title('Correlation Result');
Homework:
1) After you have completed LAB2, you had the following Matlab function in LAB2 folder:
(conv_m), use it to obtain the following signal: