% Set number of iterations and wavelet name. 
%axis on
close all;
iter = 10;
wav = 'db2';
skladani=2;

[phi,psi,xval] = wavefun(wav,iter);
[x, velkost] = size(xval);
nosic = xval(velkost)
total_size=floor(velkost+skladani*velkost/nosic)+10;
phi_long = zeros(1, total_size);
phi_long(1:velkost)=phi;
plot(phi_long,'red');

hold on

posun = floor(velkost/nosic);
for i=1:skladani
    pole = zeros(1, total_size);
    pole(1+posun*i:1+(posun)*i+(velkost-1)) = phi(1:velkost);
    plot(pole);
    skalarny_sucin=phi_long*pole'
end