Sam
2
%Name:-Bhamare kishor %MIS No.141305012 Program of Sampling Theoram in Matlab clc n=401;%number of samples %for input signal t=-2:0.01:2; f=input('Enter input frequency='); w=2*pi*f; y=sin(w*t); subplot(2,2,1); plot(t,y); xlabel('time(sec)'); ylabel('sin(wt)'); title('Sampling graph for fs<f'); grid on; %samples fs=4*f; t1=-2:(1/fs):2; y1=zeros(n); y1=sin(w*t1); subplot(2,2,2); axis([-1 1 -2 2]); stem(t1,y1); xlabel('time(sec)'); ylabel('sin(wt1)'); grid on; fs=10*f; t1=-2:(1/fs):2; y1=zeros(n); y1=sin(w*t1); subplot(2,2,3); axis([-1 1 -2 2]);
-
Upload
kishor-bhamare -
Category
Documents
-
view
214 -
download
0
description
nyquist condition
Transcript of Sam
-
5/19/2018 Sam
1/3
%Name:-Bhamare kishor
%MIS No.141305012
Program of Sampling Theoram in Matlab
clc
n=401;%number of samples
%for input signal
t=-2:0.01:2;
f=input('Enter input frequency=');
w=2*pi*f;
y=sin(w*t);
subplot(2,2,1);
plot(t,y);xlabel('time(sec)');
ylabel('sin(wt)');
title('Sampling graph for fs
-
5/19/2018 Sam
2/3
stem(t1,y1);
xlabel('time(sec)');
ylabel('sin(wt1)');
grid on;
fs=25*f;
t1=-2:(1/fs):2;
y1=zeros(n);
y1=sin(w*t1);
subplot(2,2,4);
axis([-1 1 -2 2]);
stem(t1,y1);
xlabel('time(sec)');
ylabel('sin(wt1)');grid on;
-
5/19/2018 Sam
3/3