No BSD License
function x1 = newton1(a, b, c, d) % cherche une racine en partant du point 0, la prcision epsi epsi = 1.0E-5; x1 = 0; while 1 fprim = (3*a*x1+2*b)*x1+c; if fprim == 0 x1 = -b/a; else dx = -(((a*x1+b)*x1+c)*x1+d)/fprim; x1 = x1 + dx; if abs(dx) < epsi break; end; end; end;
Contact us at files@mathworks.com