function [lip,lfp] = laintpol2(uzly,ff)
% function [lip,lfp] = laintpol(uzly,ff)
% Lagrangeuv interpolacni polynom
% uzly,ff - radkove vektory
% lip - Lagr. interpol. polynom
% lfp - matice fundamentalnich polynomu

om=poly(uzly);
omd=polyder(om);
n=length(uzly)-1;
lip=zeros(1,n+1);
lfp=[];
for ii=0:n
    i1=ii+1;
    xi=uzly(i1);
    citatel=deconv(om,[1,-xi]);
    jmenovatel=polyval(omd,xi);
    li=1/jmenovatel*citatel; % fundamentalni polynom
    lfp=[lfp;li];
end
lip=ff*lfp;
end

