Experiment - 7 Verification of Sampling Theorem: Name:P.Sai Manoj Date: ROLL NO. 16H61A044 Page No
Experiment - 7 Verification of Sampling Theorem: Name:P.Sai Manoj Date: ROLL NO. 16H61A044 Page No
EXPERIMENT -7
VERIFICATION OF SAMPLING THEOREM
AIM:
To verify the functionality of sampling theorem by using message and carrier signal.
SOFTWARE REQUIRED:
MATLAB software and Personal computer.
THEORY: The sampling theorem is a fundamental bridge between continuous-time
signals and discrete-time signals . It establishes a sufficient condition for a sample rate that permits a
discrete sequence of samples to capture all the information from a continuous-time signal of
finite bandwidth.
Sampling is a process of converting a signal (for example, a function of continuous time and/or
space) into a numeric sequence.
When the band limit is too high (or there is no band limit), the reconstruction exhibits imperfections
known as aliasing.
SOURCE CODE:
clc; %clear command window
close all; %close all windows
clear all; %clear the workspace
t=0:0.001:1; %time range of function
fm=1; %frequency declaration
fc=20; %frequency declaration
x=sin(2*pi*fm*t); %declaring message signal Commented [rrp1]:
subplot(2,2,1); %subplotting
plot(t,m); %plotting above function
xlabel('time'); %labelling x as time
ylabel('amplitude'); %labelling y as amplitude
title('message signal'); %naming the function
c=square(2*pi*fc*t)+1; %declaring y function
subplot(2,2,2); %subplotting
plot(t,c); %plotting above function
xlabel('time'); %labelling x as time
ylabel('amplitude'); %labelling y as amplitude
title('carrier signal'); %naming the function
z=m.*c; %declaring z function
subplot(2,2,3); %subplotting
plot(t,z); %plotting above function
xlabel('time'); %labelling x as time
ylabel('amplitude'); %labelling y as amplitude
title('sampled signal'); %naming the function
w=100; %filter coefficient value
y=filter(ones(1,w)/w,1,z); %declaring reconstructed signal
subplot(2,2,4); %subplotting
plot(t,y); %plotting above function
xlabel('time'); %labelling x as time
ylabel('amplitude'); %labelling y as amplitude
title('reconstructed signal'); %naming the function
PROCEDURE:
1. Open MATLAB.
2. Go to file and create new M-file.
3. Type the program in editor.
4. Save in current directory.
5. Go to debug and run the program.
6. Check the error in command window.
7. Observe the output in common window or works space.
RESULT: The sampling theorem functionality is verified by producing sampled output signal with
message and carrier signals.
OUTPUT WAVEFORMS: