function prolozeni
t=1:5;
u=[14,16,17,19,20.5];
plot(t,u,'ro')
k=polyfit(t,u,2)
xj=linspace(0.5,5.5,1000);
yj=polyval(k,xj);
k1=polyfit(t,u,1)
y1=polyval(k1,xj);
k3=polyfit(t,u,3)
y3=polyval(k3,xj);
hold on
plot(xj,yj,'k',xj,y1,'c',xj,y3,'b')
legend('body','polynom 2. stupne','polynom 1. stupne','polynom 3. stupne','Location','SouthEast')
hold off
end

