summaryrefslogtreecommitdiff
path: root/716/CH2/EX2.22.b/Solved_Ex2_22b.sce
blob: 348e13afdac2928e33cbfa922bdd3c47e3fbbcde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Perform Convolution of signals->x1=exp(-at)  0<=t<=T and x2=1    0<=t<=2T
clc;
clear;
t=0:0.01:5;
a=5;
T=12;
x1=exp(-a*t).*(t>=0&t<=T);
x2=1.*(t>=0&t<=2*T);
subplot(1,2,1)
plot(t,x1);
subplot(1,2,2)
plot(t,x2);

x=convol(x1,x2);
t1=0:1:(length(x)-1);
xset('window',1);
plot(t1,x);