%vstupne parametre
sqrt2=2^0.5;
% linearne spline wavelety
%h=[sqrt2/4,sqrt2/2,sqrt2/4]
% kvadraticke spline wavelety
%h=[sqrt2/8,3*sqrt2/8,3*sqrt2/8,sqrt2/8]
% kubicke spline wavelety
h=[1*sqrt2/16,4*sqrt2/16,6*sqrt2/16,4*sqrt2/16,1*sqrt2/16]
%h(1)=h(1)+0.4
iterations=8
initsignal=[1]

%zobrazime vysledne filtre
h
g=qmf(h)

%zobrazime vysledne phi(t) a psi (t)
for a=1:iterations
   phi=upcoef('a',initsignal,h,g,a);
   psi=upcoef('d',initsignal,h,g,a);
   subplot(2,1,1)
   plot(phi)
   subplot(2,1,2)
   plot(psi);
 pause
end