%Secant uses the secant method to approximate the zero of an inline
%function with an interval given

f=inline('816*x^3-3835*x^2+6000*x-3125');

a=1;
b=2;
k=0

while abs(b-a) > eps*abs(b)
    c=a;
    a=b;
    
    b=b+(b-c)/(f(c)/f(b)-1);
    k=k+1;
    disp([k b]);
end