// metodo de ponto fixo generico

function [raiz, iter] = mpf (phi, x0)
  iter = 0;
  x = x0;
  while abs(x - phi(x)) >= 0.01 do
    x = phi(x);
    iter = iter + 1;
  end
  raiz = x;
endfunction

