Professional Documents
Culture Documents
All All: %sampling Frequencies Are Represented by Fs
All All: %sampling Frequencies Are Represented by Fs
Fs2=20;
ts2=0:(1/Fs2):.2; % the sampling period is 1/Fs2
xs2=sin(2*pi*f*ts2); %sampling the original signal at Fs2 Hz
subplot(4,1,4), stem(ts2,xs2);
hold on;
yi2=interp1(ts2,xs2,t);
subplot(5,1,2),plot(t,yi2,'r');
title('Sampled at 20Hz and then Interpolated');
Fs3=50;
ts3=0:(1/Fs3):.2; % the sampling period is 1/Fs3
xs3=sin(2*pi*f*ts3); %sampling the original signal at Fs3 Hz
subplot(5,1,4), stem(ts3,xs3);
title('Sampled at 50Hz');
Fs4=100;
ts4=0:(1/Fs4):.2; % the sampling period is 1/Fs4
xs4=sin(2*pi*f*ts4); %sampling the original signal at Fs4 Hz
subplot(5,1,5), stem(ts4,xs4);
title('Sampled at 100Hz');