clear all
close all
  
  a = 0.01 ; b = pi ; tol = 1e-5 ; itmax = 200 ;


  [xk,resd,it] = bisection(a,b,tol,itmax,@rootfun);
  ['Bisection (root: ',num2str(xk(end)),' found with ',int2str(it),' iterations)']
 
  [xk,resd,it] = secant(a,b,tol,itmax,@rootfun); 
  ['Secant (root: ',num2str(xk(end)),' found with ',int2str(it),' iterations)']

  [xk,resd,it] = newton(a,b,tol,itmax,@rootfun); 
  ['Newton (root: ',num2str(xk(end)),' found with ',int2str(it),' iterations)']
