Professional Documents
Culture Documents
Lab 6
Lab 6
LAB # 6
OBJECTIVE
• To learn the concepts of D/A conversion.
• To learn the operation of Sampling.
THEORY
Unit sample sequence is often called the discrete time impulse or the unit impulse. It
(n)= 1 for n= 0
0 for n≠ 0
0 for n<0
CLASS ACTIVITY
EXAMPLE 6.1
EXAMPLE 6.2
clf;
n = -10:20; %generate a vector from -10 to 20
u=[zeros(1,10) 1 ones(1,20)]; %generate the unit step sequence
stem(n,u); %plot the unit step sequence
xlabel('time independent n');
ylabel('Amplitude');
title('Unit Step Sequence');
axis([-10 20 0 1.2]);
CE 308: Communication System 3
CONCEPT OF DIGITAL TO ANALOG CONVERSION LAB # 6
EXAMPLE 6.3
clf;
n = -10:20; %generate a vector from -10 to 20
u=[zeros(1,10) 1 ones(1,20)]; %generate the unit step sequence
y=[3 2 4 9 7 8 10 11 12 5 8 10 12 zeros(1,18)];
r=u.*y;
stem(n,r);
xlabel('time independent n');
ylabel('Amplitude');
title('Unit Step Sequence');
axis([-10 20 0 15]);
EXAMPLE 6.4
Implement the following figure using the concept of train of weighted
impulses. Hint: integrate the impulse function (i.e. implement
∞ 5
s (t ) = ∫ ∑A δ (t − nT
−∞n =−5
n o ) dt such that T0 =1 and An is given in the
figure below:
syms t
T0 = 1;
n = [-5:5]; % range of samples
An = [5 5 3 2 0 2 4 1 6 0 3];
x = An .* (dirac(t-(n*T0)) )
y = int(x,t,-inf,inf) %integrate and you will get the weights
z = eval(y); %can't directly plot symbol.
stem (n,z); %plotting the weights with sample time n
clear all
HOME TASK