2
1.
Write a Matlab code for sampling following signal.
x
(t) =sin (2F
1
t) + sin (2F2t)
T
ake the time range t= [0:0.1:20]F1=0.1 and F2=0.2
Code:
X
label ('n');Ylabel ('x_samples');Title ('Sample');x_recon=0;subplot (3,1,3);for k=0:length(x_samples)-1stem (0:length(x_samples)-1,x_samples);l=k:-.1:-20+k;x_recon=x_recon+x_samples(k+1)*sinc(l);axis ([0 20 -2 2]);hold ;plot (t,x_recon,'ko');end;xlabel('t');ylabel ('x_recon');title ('Reconstructed Signal');
Figure:
2.
Find D
T
F
T
for given specificationsNum= [1 -0.6]Den= [2 1]Plot magnitude spectrum and phase spectrum.
Code:
Num = [1 -.6];
Den = [2 1];
0 2 4 6 8 10 12 14 16 18 20-202t
x ( t )
Given Signal0 5 10 15 20 25-202n
x
s
a m p l e s
Sample0 2 4 6 8 10 12 14 16 18 20-202t
x
r
e c o n
Reconstructed SignalLabsheet-4::Question-1
Leave a Comment