broyden
Solve a set of nonlinear algebraic equations.
(root)=broyden(func, xin )
(root)=broyden(func, xin, showit, itmax, tol)
Inputs
func The function defining the set of nonlinear equations to be solved. It should be a function of the form (y)=f(x) and return an array of the same size as the input which is always a vector of more than one real numbers.
xin the initial guess of the solution .
showit true if the progress of iterations is to be printed out at each iteration. Default value=false .
itmax Maximum no. of iterations allowed . Default value=30.
toler Convergence tolerance. Default value=1.e-6.
Outputs
x The computed solution, if the iterations converge.
it The number of iterations required.
success true if the iterations converge, and false otherwise.


Description
broyden solves the nonlinear equation func(x) = 0, with x and func(x) being vectors of the same size n>1 .
Example
>>x=broyden(@(x)([x[1]^2+x[2]^2-1;x[1]-x[2]^2]),[.5 .5]');
>>x
  0.6810
  0.7862
>>[x[1]^2+x[2]^2-1;x[1]-x[2]^2]
Scaled by 10^-10
   -0.2433
   -0.4314