The function newtonsolve.m solves generic systems of nonlinear equations using the standard Newton or Broyden methods. The ancillary function jacob1.m computes the Jacobian using numerical differentiation. Broyden's method avoids the computation of the Jacobian at each iteration, but achieves only superlinear convergence. This means that, in general, Broyden is more efficient - sometimes dramatically so - than Newton, but potentially less robust.