Performance Task For Lab Report:: Name:ismail Hossain Muzumder Id:18-37052-1 Section:D
Performance Task For Lab Report:: Name:ismail Hossain Muzumder Id:18-37052-1 Section:D
Id:18-37052-1
Section:D
So,
A=1
B= 8
C= 3
D= 7
E= 0
F= 5
G= 2
H= 1
x1(t) = A1 cos(2π(C*100)t )
x2(t) = A2 cos(2π(F*100)t)
Answer:
Amplitude of both waves are:
A1=GD=27
A2=AF=15
Answer:
fs = 1000;
t=-0.01:1/fs:0.01;
C=3;
F=5;
A1=27;
A2=15;
x1= A1*cos(2*pi*C*100*t);
x2= A2*cos(2*pi*F*100*t);
x3= x1+ x2;
plot(t,x3,'k')
xlabel('Time');
ylabel('Amplitude');
title('Time Domain')
(c) Plot x3in frequency domain and calculate its bandwidth.
fs = 10000;
t=-0:1/fs:1-1/fs;
C=3;
F=5;
A1=27;
A2=15;
x1= A1*cos(2*pi*C*100*t);
x2= A2*cos(2*pi*F*100*t);
x3= x1+ x2;
fx1=fft(x3);
fx1=fftshift(fx1)/(fs/2);
f=fs/2*linspace(-1,1,fs);
plot(f,abs(fx1),'b');
xlabel('Frequency');
ylabel('Amplitude');
title('Magnitude')
(D) Quantize x3in 6 equally distributed levels and
provideimagefor one cycle of the original signal and quantized
signal.
fs = 10000;
t=-1:1/fs:100-1/fs;
C=3;
F=5;
A1=27;
A2=15;
x1= A1*cos(2*pi*C*100*t);
x2= A2*cos(2*pi*F*100*t);
x3= x1+ x2;
sig=x3(1:200);
time=t(1:200);
xmin=min(x3);
xmax=max(x3);
line=linspace(xmin,xmax,6);
partition=[(line(1)+line(2))/2,(line(2)+line(3))/2,(line(3)+line(4))/2,(line(
4)+line(5))/2,(line(5)+line(6))/2];
codebook=linspace(xmin,xmax,6);
[index,quants]=quantiz(sig,partition,codebook);
figure
plot(time,sig,'x',time,quants,'.');
xlabel('Time');
ylabel('sigma partition');
title('Quantized wavefroms');
legend('Orginal signal','quantized signal');