0% found this document useful (0 votes)
9 views

Sampling: 'Time in Seconds' 'X (T) ' 'Continous Time Signal'

This document defines a continuous time cosine signal with frequency fm and samples it at different sampling frequencies fs1, fs2, and fs3. It plots the original continuous time signal alongside the discrete time signals to show the effects of sampling at rates below, equal to, and above twice the maximum frequency fm.

Uploaded by

Umer Ehsan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Sampling: 'Time in Seconds' 'X (T) ' 'Continous Time Signal'

This document defines a continuous time cosine signal with frequency fm and samples it at different sampling frequencies fs1, fs2, and fs3. It plots the original continuous time signal alongside the discrete time signals to show the effects of sampling at rates below, equal to, and above twice the maximum frequency fm.

Uploaded by

Umer Ehsan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SAMPLING

t=-10:0.01:10;
fm=0.2;
x=cos(2*pi*fm*t);
fs1=1.2*fm;
fs2=2*fm;
fs3=8*fm;
n1=-4:1:4;
xn1=cos(2*pi*n1*fm/fs1);
subplot(221)
plot(t,x);
xlabel('time in seconds');
ylabel('x(t)');
title('continous time signal');
subplot(222)
stem(n1,xn1);
hold on;
plot(n1,xn1);
xlabel('n');
ylabel('x(n)');
title('discrete time signal with fs<2fm');
n2=-5:1:5;
xn2=cos(2*pi*n2*fm/fs2);
subplot(223)
stem(n2,xn2);
hold on;
plot(n2,xn2);
xlabel('n');
ylabel('x(n)');
title('discrete time signal with fs=2fm');
n3=-20:1:20;
xn3=cos(2*pi*n3*fm/fs3);
subplot(224)
stem(n3,xn3);
hold on;
plot(n3,xn3);
xlabel('n');
ylabel('x(n)');
title('discrete time signal with fs>2fm');
continous time signal discrete time signal with fs<2fm
1 1

0.5 0.5

x(n)
x(t)

0 0

-0.5 -0.5

-1 -1
-10 -5 0 5 10 -4 -2 0 2 4
time in seconds n
discrete time signal with fs=2fm discrete time signal with fs>2fm
1 1

0.5 0.5
x(n)

x(n)
0 0

-0.5 -0.5

-1 -1
-5 0 5 -20 -10 0 10 20
n n

You might also like