% file:      	wavelets_mex_hat.m, (c) Matthew Roughan, Wed Aug  3 2005
%                 Mexican hat wavelets

t = -5:0.01:5;
w = -5:0.01:5;
sigma = 1;
psi = (2/(sqrt(sqrt(pi)*3*sigma))) * ...
      ((t.^2/sigma^2)-1) .* exp(-t.^2/(2*sigma^2));
Psi = -( sqrt(8)*sigma^(5/2)*pi^(1/4)/sqrt(3) ) * w.^2 .* ...
      exp(-sigma^2*w.^2/2);


figure(1)
hold off
plot(t, psi, 'linewidth', 3);
hold on
set(gca, 'linewidth', 3, 'fontsize', 18);
xlabel('time');
ylabel('\psi');
print('-depsc', 'Plots/wavelets_mexican_hat_psi.eps');

figure(2)
hold off
plot(t, Psi, 'linewidth', 3);
hold on
set(gca, 'linewidth', 3, 'fontsize', 18);
xlabel('frequency');
ylabel('\Psi');
print('-depsc', 'Plots/wavelets_mexican_hat_Psi.eps');

