You are on page 1of 4

LABORATORY JOURNAL

Digital Signal Processing


EE-306

Submitted By

SANA MAJID 17-EE-038


HIRA SAGHIR 17-EE-051
OMAR ABDUL JABBAR 17-EE-074

Section: D Group: ___________

Department of Electrical Engineering


HITEC University
Heavy Industries Taxila Education City
Experiment No 1 Date:______________

Objective:

To obtain convolution of two discrete signals

Code:

x= [2,6,2,2]
h= [4,2,1,1]
a=length(x)
b=length(h)

X=[x,zeros(1,b)]
H=[h,zeros(1,a)]
for i=1:(a+b)-1
y(i)=0
for j=1:a
if (i-j+1)>0
y(i)= y(i)+X(j)*H(i-j+1)
else
end
end
end
subplot(3,2,1)
stem(X)
subplot( 3,2,2)
stem(H)
subplot(3,2,3)
stem(y)

Steps:

Generate code in Matlab and execute it using the given inputs, the convolution product will be shown on the graphs.
Observations and Results:

Conclusion:
Through this lab we learned how to execute discrete convolution in Matlab.

Marks Distribution:

Presentation Calculations Observation

------------------------------------

Total Marks: ______________

Marks Obtained: ________

You might also like