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

sklon_delta=tan(sklon*3.14159/180)
%wav = 'morl';
[phi,psi,xval] = wavefun(wav,iter);
hold on

[x, velkost] = size(xval);
nosic = xval(velkost)
velkost
pole_size=floor(velkost+skladani*velkost/nosic)+10;
pole = zeros(1, pole_size);
pole(1:velkost) = phi(1:velkost);
posun = floor(velkost/nosic);
for i=1:skladani
     pole(1+posun*i:1+(posun)*i+(velkost-1)) = pole(1+posun*i:1+(posun)*i+(velkost-1)) + (1+i.^rad_polynomu*sklon_delta)*phi(1:velkost);
end
plot(xval, phi);
plot(pole);