root - false position method in matlab - Stack Overflow
https://stackoverflow.com/questions/2165500508.02.2014 · Regula falsi does not guarantee that the interval shrinks to a point. For that use the Illinois variant. To get a finite iteration with the current code, change the condition to abs(x-x0)<tol OR abs(x-x1)<tol.Break the loop and return also if y is small enough abs(y)<tol.This can be made scale-independent by using the initial y0, y1 values as in scale_y=1e-8 +max(abs(y0),abs(y1)) …