clc f1=@(x) exp(-x)-x; function yy=Bisect(f,xl,xu,es,imax,xr,iter,ea) iter=0; fl=f(xl); while or((ea0) xl=xr; fl=fr; else ea=0; break; end end yy=xr; end fplot(f1,[0 1],'b') grid on; # (f,xl,xu,es,imax,xr,iter,ea) r1=Bisect(f1,0,1,3,5,0.25,0,2.6); fprintf("El valor de la raiz es = %f \n",r1)