%PROGRAM FOR PART (a):
clear;tmax=6;fmax=8;
T=2*tmax;B=2*fmax;
t=[-tmax:1/B:tmax-1/B];
f=[-fmax:1/T:fmax-1/T];
X=exp(-abs(t));
fX=2./(4*pi*pi*f.*f+1);
FX=fftshift(abs(fft(X)))/B;
figure,subplot(211),
plot(f,fX,'o',f,FX,'+r')
%PROGRAM FOR PART (b):
clear;tmax=4;fmax=0.625;
T=2*tmax;B=2*fmax;
t=[-tmax:1/B:tmax-1/B];
f=[-fmax:1/T:fmax-1/T];
X=exp(-t.*t/2)/sqrt(2*pi);
fX=exp(-2*pi*pi*f.*f);
FX=fftshift(abs(fft(X)))/B;
figure,subplot(211),
plot(f,fX,'o',f,FX,'+r')
