Professional Documents
Culture Documents
7.2 INTRODUCTION:
Time domain is the analysis of mathematical functions, physical signals or time
series of economic or environmental data, with respect to time. In the time domain, the signal
or function's value is known for all real numbers, for the case of continuous time, or at
various separate instants in the case of discrete time. When we analyze signals we tend to do
so on only small portions at a time. The reason for this is that we typically assume that the
signal is constant A time-domain graph shows how a signal changes with time, whereas a
frequency-domain graph shows how much of the signal lies within each given frequency
band over a range of frequencies
Code Output
clc
Convolution
t=-1:3; 0.9
tx1=-1:0.5;
tx2=0.5:3;
x1=0.6*ones(size(tx1 0.8
));
x2=0.3*ones(size(tx2 0.7
));
TX=[tx1 tx2]; 0.6
X=[x1 x2];
h1=(t>=0); 0.5
H=(exp(-t).*h1);
x(t)*h(t)
y=conv(X,H);
ly=length(X) 0.4
+length(H)-1;
plot(-1:ly-2,y,'o-') 0.3
title('Convolution')
; 0.2
ylabel('x(t)*h(t)');
xlabel('time t')
0.1
0
-1 0 1 2 3 4 5 6 7
time t
Figure 1
In Lab Task 2: Suppose that a system is described by the impulse response h(t)=cos(2πt)
(u(t)-u(t-4)) Compute (by conv command) and plot the response of the system to input
shown in figure below
Code Output
clc Convolution
t=0:6; 2
X=[0 2 0 0 0 0 0];
h1=(t>=0); 1.8
h2=(t>=4);
H=cos(2*pi*t).*(h1- 1.6
h2);
y=conv(X,H); 1.4
ly=length(X)
+length(H)-1; 1.2
figure;
x(t)*h(t)
plot(0:ly-1,y); 1
title('Convolution')
; 0.8
ylabel('x(t)*h(t)');
xlabel('time t') 0.6
X1=deconv(y,H)
figure; 0.4
plot(t,X1)
title('De- 0.2
Convolution');
ylabel('x(t)'); 0
0 2 4 6 8 10 12
xlabel('time t') time t
Figure 2
De-Convolution
2
1.8
1.6
1.4
1.2
x(t)
1
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6
time t
Figure 3
Post-Lab Task 1: Compute (by both procedures) and graph the convolution
y[n]=x[n]*h[n] where x[n]=u[n]-u[n-4] and h[n]= n]-n-2]
Code Output
clc
Convolution
t=-0:10; 2
tx1=0:1;
tx2=1:2;
1.8
tx3=2:10;
x1=zeros(size(tx1));
1.6
x2=ones(size(tx2));
x3=zeros(size(tx3));
1.4
TX=[tx1 tx2 tx3];
X=[x1 x2 x3];
H=[x1 x2 x3] 1.2
y=conv(X,H);
x(t)*h(t)
ly=length(X) 1
+length(H)-1;
plot(-1:ly-2,y,'o-') 0.8
title('Convolution')
; 0.6
ylabel('x(t)*h(t)');
xlabel('time t') 0.4
0.2
0
-5 0 5 10 15 20 25
time t
Figure 4
Date: ______________
Experiment Number: ____
CLOs Covered: ________
PLOs Covered: ________
Total Marks
Unsatisfactory [1-5]
Average [5-7]
Meets Expectations [7-9]
Exceed Expectations [9-10]
______________________________
Lab Instructor Engr. Javeria Abid