North South University
Department of Electrical & Computer Engineering
Home Work
Course Code: EEE221
Course Title: Signals and Systems Lab
Faculty: MR SYED FATEH AL KASTUR(FKR)
Experiment Number: 07
Experiment Name:
Convolution Integral
Experiment Date: 10/10/23
Date of Submission: 12/10/23
Section: 02
Submitted To: MD. AL – AMIN BHUIYAN
Score
Serial ID
No
Name
02 MD. IFTHAKHAR HOSSAN 1611455043
Problem-2
clc; clear all;
x=[3,11,7,0,-1,4,2]; %input
signal
h=[2,3,0,-5,2,1]; %system
y=conv(x,h)
Problem-3
clc; clear all;
x=[6,1,7,0,-9,4,12]; %input
signal
h=[6,0,10,-5,4,8]; %system
y=conv(x,h)
Problem-4
clc; clear all;
x=[3,11,7,0,-1,4,2]; % input
signal function
nx=[-3:3]; %starts from -3,
ends at 3
h=[2,3,0,-5,2,1]; %system
function
nh=[-1:4]; %starts from -1,
ends at 4
ny1= nx(1)+ nh(1);
ny2= nx(end) + nh(end);
ny= [ny1: ny2];
y= conv(x, h)
Problem-5
clc; clear all;
x=[2,6,0,-9,6,3]; %input
signal
h=[1,0,15,-6,4,7]; %system
y=conv(x,h)
Problem-6
clc; clear all;
x=[3,11,7,0,-1,4,2]; % input
signal function
nx=[-3:3]; %starts from -3,
ends at 3
h=[3,11,7,0,-1,4,2]; %system
function
nh=[-3:3]; %starts from -3,
ends at 3
ny1= nx(1)+ nh(1);
ny2= nx(end) + nh(end);
ny= [ny1: ny2];
y= conv(x, h)
Problem-7
clc; clear all;
x=[3,11,7,0,-1,4,2]; % input
signal function
nx=[-4:4]; %starts from -4,
ends at 4
h=[2,3,0,-5,2,1]; %system
function
nh=[-1:4]; %starts from -1,
ends at 4
ny1= nx(1)+ nh(1);
ny2= nx(end) + nh(end);
ny= [ny1: ny2];
y= conv(x, h)
Problem-8
clc; clear all;
x=[1,2,3,4,5,6,7,6,5,4,3,2,1];
% input signal function
nx=[-2:10]; %starts from -2,
ends at 10
h=[-5,-4,-3,-2,-
1,0,1,2,3,4,5]; %system
function
nh=[-5:5]; %starts from -5,
ends at 5
ny1= nx(1)+ nh(1);
ny2= nx(end) + nh(end);
ny= [ny1: ny2];
y= conv(x, h)
Problem-9
clc; clear all;
t= -0.1: 0.1;
x=sin(2*t); % input signal
function
nx=[-0.1: 0.1]; %starts from
-0.1, ends at 0.1
h=cos(2*t); %system function
nh=[-0.1: 0.1]; %starts from -
0.1, ends at 0.1
ny1= nx(1)+ nh(1);
ny2= nx(end) + nh(end);
ny= [ny1: ny2];
y= conv(x, h)
plot(t, y)
Problem-10
function [y, ny]=
conv_m(x,nx,h,nh)
ny1= nx1+ ny1;
ny2= nx(end)+ nh(end);
ny= [ny1: ny2];
y=conv(x,h);
end
clc; clear all;
x=[1,1,1]; %input signal
function
nx=[0: 2]; %starts from 0, ends
at 2
h=[1,1,0]; %system function
nh=[0: 1: 2]; %starts from 0
and 2, ends at 2
[y, ny]= conv_m(x,nx,h,nh)
Problem-1