0% found this document useful (0 votes)
63 views3 pages

Sampling Theorem

The document discusses the sampling theorem through a MATLAB simulation. It generates a sine wave input signal, samples it at frequencies below, at, and above the Nyquist rate, and plots the original and reconstructed signals to illustrate the effects of under, proper, and oversampling.

Uploaded by

Samruddhi Jadhav
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)
63 views3 pages

Sampling Theorem

The document discusses the sampling theorem through a MATLAB simulation. It generates a sine wave input signal, samples it at frequencies below, at, and above the Nyquist rate, and plots the original and reconstructed signals to illustrate the effects of under, proper, and oversampling.

Uploaded by

Samruddhi Jadhav
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

Sampling Theorem

t=0:0.001:1;

f=input('enter input frequency');

x=sin(2*3.14*f*t);

subplot(4,2,1);

plot(t,x);

xlabel('time');

ylabel('amplitude');

title('input signal');

fs1=input('enter the sampling frequency<input signal frequency');

fs2=input('enter the sampling frequency=input signal frequency');

fs3=input('enter the sampling frequency>input signal frequency');

t1=0:1/fs1:1;

x1=sin(2*3.14*f*t1);

subplot(4,2,2);

stem(t1,x1);

xlabel('time');

ylabel('amplitude');

title('undersampling at fs<2f');

subplot(4,2,3);

plot(t1,x1);

xlabel('time');

ylabel('amplitude');

title('reconstructed undersampling fs<2f signal');


t2=0:1/fs2:1;

x2=sin(2*3.14*f*t2);

subplot(4,2,4);

stem(t2,x2);

xlabel('time');

ylabel('amplitude');

title('sampled at nyquist rate fs=2f');

subplot(4,2,5);

plot(t2,x2);

xlabel('time');

ylabel('amplitude');

title('reconstructed signal fs=2f signal');

t3=0:1/fs3:1;

x3=sin(2*3.14*f*t3);

subplot(4,2,6);

stem(t3,x3);

xlabel('time');

ylabel('amplitude');

title('oversampled fs>2f signal');

subplot(4,2,7);

plot(t3,x3);

xlabel('time');

ylabel('amplitude');

title('reconstructed oversampled fs>2f signal');

----------------OUTPUT-------------------
enter input frequency15

enter the sampling frequency<input signal frequency10

enter the sampling frequency=input signal frequency30

enter the sampling frequency>input signal frequency500

You might also like