% Example of foutier and ifourier with
% plots in separate figures
% Add/Remove % below to select a different function 

clear
syms t w
t0=0.0;
t1=2.0;
f = heaviside(t+t0)-heaviside(t-t1);
%f=exp(-abs(t));

F=fourier(f);

figure(1)
ezplot(f,[-10.0,10.0])
xlabel('t')
ylabel('f(t)')
title(['f(t) vs t'] )

figure(2)
ezplot(abs(F),[-20,20])
xlabel('\omega')
ylabel('F(\omega)')
title(['Fourier Transform of f(t)'] )
