clc ; clear all x = 1:0.01 :2; g=inline('0.5*sqrt(10-x.^3)') ; %g=exp(sin(x)) ; plot(x,g(x),x,x) ; grid ; x0 = input('x0 = ') ; %eps = input('eps = ') ; eps = 1.0e-4; Nmax = input('Nmax = ') ; for n = 1 : Nmax x = x0 ; x0 = g(x) ; err = abs(x0-x) ; if (err <= eps) fprintf('pour i=%d la solution x0=%f avec erreur = %f \n',n,x0,err) ; end end