You are on page 1of 4

Baseband-PCM

• Generate the input signal using sampling frequency fs


• Plot the sampled signal using STEM
• Quantize the signal using ‘ quantiz’
• Convert the decimal to binary using ‘dec2bin’
• Convert ‘bin2dec’
• Apply butter worth filter to collect the coefficients
using ‘butter’
• Reconstruct the signal using ‘filter’
Modulation
fs=1000;
f=10;
t1=0:1/fs:(2/f- 1/fs);
x=2+2*sin(2*pi*10*t1);
subplot(5,1,1);
plot (t1,x);
subplot(5,1,2);
stem(t1,x);
title('Sampled Signal')
partition =[0:0.5:4];
codebook=[0:0.5:5];
[i,q]=quantiz(x,partition,codebook);
q
subplot(5,1,3);
stairs(t1,q);
title('Quantized Signal');
y=dec2bin(q);
y
Demodulation
z=bin2dec(y);
[b,a] = butter(2,0.02,'low');
k=filter(b,a,z);
subplot(5,1,4)
plot(t1,z)
subplot(5,1,5)
plot(t1,k);

You might also like