MATLAB code for Sampling Theorem verification -Over sampling
Aim: Write MATLAB code for Sampling Theorem verification -Over sampling
Requirements: PC with MATLAB software
Program:
clc;
clear all;
close all;
fm=200;
fs=800;
t=0:1/fs:(10/fm);
x=sin(2*pi*fm*t);
fx=fft(x,64);
xr=ifft(fx,64);
f=(-31*fs/64):(fs/64):(32*fs/64);
fx=[fx(34:64) fx(1:33)];
subplot(1,3,1);
stem(x);
title('sampled signal')
subplot(1,3,2);
stem(f,abs(fx)),axis([-300 300 0 30]);
title('frequency spectrum')
subplot(1,3,3);
stem(xr);
title('recovered signal');
Output:
-
UpdatedFeb 05, 2020
-
Views3,760
You May Like
MATLAB code for Pulse position modulation
DSB-SC Amplitude Modulation program scilab-code
Single Side Band Suppressed Carrier (SSB - SC) - Modulation Scilab code using hilbert transform
MATLAB code for Pulse width modulation
DSB-SC Demodulation program scilab
MATLAB code for Double side band suppressed carrier