Monday 10 November 2014

MATLAB Code For SAMPLING THEORM



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
%%% sampling theorm %%%%%%%%%%%%%5
%%% x= sin(2*pi*f1*n)+cos(2*pi*f2*n) %%%%
%%% with f1= 2/128 & f2 = 4/128 %%%%%

clc;
close all;
clear all;
f1=2/128;
f2=4/128;
n=0:255;
fc=50/128;
x=sin(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('n -->');
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');

%%%%%%%%%%%%%%%%%%%%%%%%

 



Download Project for B.E, B.Tech, BCA, MCA, M.E, M.Tech, B.Sc, M.Sc and Polytechnic



  1 comment:

  1. sir can you upload matlab code for calculating maximium and minimium difference value.....

    ReplyDelete

Total Pageviews

CONTACT US

Prof. Roshan P. Helonde
Mobile / WhatsApp: +917276355704
Email: roshanphelonde@rediffmail.com

Contact Form

Name

Email *

Message *

Archive

Notes Planet Copyright 2018. Powered by Blogger.