You are on page 1of 2

UNIVERSITY OF ENGINEERING AND TECHNOLOGY

TAXILA

DSP LAB :5

Submitted To: Sir Aamir Arsalan


Submitted by: Amna Bibi
Registration No: 19-CP-04
Code:
function y=my_convolsum()
clc
clear all ;
close all;
X = input("Enter the input signal");
H = input("Enter the impulse response");
C=[];
for s=1:length(X)
z=H.*X(s);
C= [C;z];
end
[row, col] = size(C);
k= row+col;
t=2;
y=[];
cd=0;
while (t<=k)
for i=1:row
for j=1:col
if ((i+j)==t)
cd=cd+ C(i,j);
end
end
end
t=t+1;
y= [y cd];
cd = 0;
end
disp(y);
end

Result:

You might also like