function stupenPol
while(1)
    st=input('Zadej stupen polynomu: ');
    if(st>=1)&&(st<=7)
        break;
    end
end
prolozeniBodu(st);
end
function prolozeniBodu(st)
x=[1:9];
y=[10,15,20,22,23,24.5,25,25.3,26];
plot(x,y,'h','Markersize',10);
xj=linspace(min(x)-0.1,max(x)+0.1,1000);
hp=polyval(polyfit(x,y,st),xj);
hold on
plot(xj,hp,'g','Linewidth',3)
hold off
end
