0% found this document useful (0 votes)
9 views2 pages

Exp 10-11

Uploaded by

ved.falkeentc22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Exp 10-11

Uploaded by

ved.falkeentc22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Exp 10

clc;
clear all;
t=0:0.0005:20;
partition=-1:0.1:1;
codebook=-1:0.1:1.1;
x=sin(t);

[index,quants]=quantiz(x,partition,codebook);
subplot(3,1,1);
plot(t,x);
title('message signal');
xlabel('time');
ylabel('amplitude');

subplot(3,1,2);
plot(t,quants);
title('quantize signal');
xlabel('time');
ylabel('amplitude');

y= uencode(quants,3);
subplot(3,1,3);
plot(t,y);
title('pcm signal');
xlabel('time');
ylabel('amplitude');
Exp 11
clc;
clear all;
t=-10:01:10;
T=4;
fm=1/T;
x=cos(2*pi*fm*t);
subplot(2,2,1);
plot(t,x);
xlabel('time t');
ylabel('x(t)');
title('countinuous time signal');
grid;

n1=-4:1:4;
fs1=1.6*fm;
x1=cos(2*pi*fm/fs1*n1);
subplot(2,2,2);
stem(n1,x1);
xlabel('time t');
ylabel('x(n)');
title('discrete time signal with fs<2fm');
hold on;
subplot(2,2,2);
plot(n1,x1);
grid;

n2=-5:1:5;
fs2=2*fm;
x2=cos(2*pi*fm/fs2*n2);
subplot(2,2,3);
stem(n2,x2);
xlabel('time n');
ylabel('x(n)');
title('discrete time signal with fs=2fm');
hold on;
subplot(2,2,3);
plot(n2,x2);
grid;

n3=-20:1:20;
fs3=8*fm;
x3=cos(2*pi*fm/fs3*n3);
subplot(2,2,4);
stem(n3,x3);
xlabel('time n');
ylabel('x(n)');
title('discrete time signal with fs>2fm');
hold on;
subplot(2,2,4);
plot(n3,x3);
grid;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy