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

exp 3 sampling input output

The document demonstrates the verification of the sampling theorem through plots of continuous and discrete time signals. It includes three cases of discrete signals sampled at different frequencies relative to the signal's frequency, fm. The results illustrate the effects of under-sampling, critical sampling, and over-sampling on the representation of the original continuous signal.

Uploaded by

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

exp 3 sampling input output

The document demonstrates the verification of the sampling theorem through plots of continuous and discrete time signals. It includes three cases of discrete signals sampled at different frequencies relative to the signal's frequency, fm. The results illustrate the effects of under-sampling, critical sampling, and over-sampling on the representation of the original continuous signal.

Uploaded by

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

% Verification of sampling theorem

clc
clear all
close all
t=-100:01:100;
fm=0.02;
x=cos(2*pi*t*fm); subplot(2,2,1);
plot(t,x);
xlabel('time in sec');
ylabel('x(t)');
title('Continuous time signal');

fs1=0.01;

n=-5:0.4:5
x1=cos(2*pi*fm*n/fs1);
subplot(2,2,2);
plot(n,x1);
hold on
% subplot(2,2,2);
stem(n,x1,':');
title('Discrete time signal x(n) with fs<2fm');
xlabel('n');
ylabel('x(n)');

fs2=0.04;
n1=-5:0.2:5;
x2=cos(2*pi*fm*n1/fs2);
subplot(2,2,3);
plot(n1,x2);
hold on;
% subplot(2,2,3);
stem(n1,x2,':');
title('Discrete time signal x(n) with fs=2fm');
xlabel('n');
ylabel('x(n)');

n2=-40:40;
fs3=0.5;
x3=cos(2*pi*fm*n2/fs3);
subplot(2,2,4);
plot(n2,x3);
hold on;
% subplot(2,2,4);
stem(n2,x3,':');
xlabel('n');
ylabel('x(n)');
title('Discrete time signal x(n) with fs>2fm');
Output:

Continuous time signal Discrete time signal x(n) with fs<2fm


1 1

0.5 0.5

x(n)
x(t)

0 0

-0.5 -0.5

-1 -1
-100 -50 0 50 100 -5 0 5
time in sec n
Discrete time signal x(n) with fs=2fm Discrete time signal x(n) with fs>2fm
1 1

0.5 0.5
x(n)

x(n)

0 0

-0.5 -0.5

-1 -1
-5 0 5 -40 -20 0 20 40
n n

You might also like