function [polx,poly]=bezi(pist)
x=pist(1,:);
y=pist(2,:);
n=length(x)-1;
polx=zeros(1,n+1);
poly=zeros(1,n+1);
for k=0:n
    ap=bernstein(n,k,0);
    polx=polx+x(k+1)*ap;
    poly=poly+y(k+1)*ap;
end

 