xi = 1.8;
iterace = 0;
epsilon = 10;

while epsilon>1e-6,
    xip1 = xi - funkce(xi)/derivace(xi);
    epsilon = abs(xip1-xi);
    xi = xip1;
    reseni = xip1;
    iterace = iterace +1;
    [iterace reseni epsilon]
end