% the mexican hat andt its Fourier transform

N = 1024;
t = -5 + 10*(1:N)/N;
omega = -2*pi + 4*pi*(1:N)/N;
% coefficient for ||mh|| = 1 
cnormal = 2/sqrt(sqrt(pi)*3);
cfnormal = sqrt(2)*cnormal;

mh = cnormal*exp((-t.^2)./2).*(1-t.^2);
ftmh = cfnormal*(omega.^2).*exp((-omega.^2)./2);

figure(1);clf;
subplot(221), plot(t,mh),title('mexican hat')
subplot(222), plot(t,ftmh),title('Fourier transform of mexican hat')

%print -deps mexhat.eps

