Google Search

Wednesday, December 7, 2011

DSP ogram to understand sampling theorem


AIM: - To understand sampling theorem

PROGRAM: -

%Program to understand sampling theorem
f1=1/128;
f2=5/128;
n=0:255;
fc=50/128;
x=cos(2*pi*f1*n)+cos(2*pi*f2*n);
xa=cos(2*pi*fc*n);
xamp=x.*xa;
subplot(2,2,1);
plot(n,x);
title('x(n)');
xlabel('Sn-->');
ylabel('Amplitude');
subplot(2,2,2);
plot(n,xa);
title('xa(n)');
xlabel('n-->');
ylabel('Amplitude');
subplot(2,2,3);
plot(n,xamp);
xlabel('n-->');
ylabel('Amplitude');


                            

0 comments:

Post a Comment