function prikladInterpolaceMonomialy()

f = @(x) (sin(pi*x));
xx = -1:0.001:1;
plot(xx,f(xx),'r');
pause

for n=1:40
    i=0:n;
    x = -1+(2/n)*i;
    alfa = InterpolaceMonomialy(f,x);
    ff = xx; ff(:) = 0;
    for j=0:n
        ff = ff + alfa(j+1)*xx.^j;
    end
    n
    chyba = max(abs(ff-f(xx)))
    hold on
    plot(xx,ff,'b')
    pause(0.5);
end