% file:      	symmlets.m, (c) Matthew Roughan, Mon Aug 14 2006
%
opts = struct('height',8, 'width', 8.5, 'Color', 'rgb');
n = 1024;
J = log2(n);
j = 7;
for p=[8 10 16]
  k = 2^(J-j-1);
  m1 = MakeWavelet(J-j,k,'Daubechies',p,'Mother',n).*2^(j/2);
  m2 = MakeWavelet(J-j,k,'Symmlet',p/2,'Mother',n).*2^(j/2);
  i_m = (((1:n)-n/2)./2^j);
  figure(1)
  hold off
  p1 = plot(i_m,-m1, 'b', 'linewidth', 2);
  hold on
  p2 = plot(i_m,-m2, 'r', 'linewidth', 3);
  set(gca, 'fontsize', 18, 'linewidth', 3);
  legend([p1 p2], 'Daubechies', 'Symmlet');
  title(sprintf('mother wavelet \\psi(t), p = %d', p/2));
  axis([-p/2+1 p/2 -1.5 2])
  exportfig(gcf,sprintf('Plots/symmlet_%05d.eps',p), opts, 'format', 'eps');
  
  pause
end





% interestingly, when p for symmlets=2p for Daubechies, they look similar