function L=Lagranz() tablica; n=length(X); L=zeros(1,n); for i=1:n p=1; for j=1:n if i~=j p=conv(p,[1 -X(j)])/(X(i)-X(j)); end end L=L+p*F(i); end