# Evaluating FindRoot at different starting points on a grid

I'm trying to evaluate the roots of a complex function at different starting points on a grid using Do[Do[FindRoot[g[z], {z, j + k*I}], {j, 10}], {k, 10}]. However, it gives me the following error messages:

FindRoot::jsing: Encountered a singular Jacobian at the point {z} ={-17.0839+14.7475 I}. Try perturbing the initial point(s). >>
FindRoot::lstol: The line search decreased the step size to within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a sufficient decrease in the merit function. You may need more than MachinePrecision digits of working precision to meet these tolerances. >>
FindRoot::lstol: The line search decreased the step size to within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a sufficient decrease in the merit function. You may need more than MachinePrecision digits of working precision to meet these tolerances. >>
FindRoot::lstol: The line search decreased the step size to within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a sufficient decrease in the merit function. You may need more than MachinePrecision digits of working precision to meet these tolerances. >>
General::stop: Further output of FindRoot::lstol will be suppressed during this calculation. >>
FindRoot::jsing: Encountered a singular Jacobian at the point {z} = {-16.872+27.5137 I}. Try perturbing the initial point(s). >>
FindRoot::jsing: Encountered a singular Jacobian at the point {z} = {-17.5117+54.0621 I}. Try perturbing the initial point(s). >>
General::stop: Further output of FindRoot::jsing will be suppressed during this calculation. >>


After the error messages it stops displaying any output. I know most of the starting points will generate those errors. I'm trying to use the Do loop so I can get past those errors to the valid starting points. Does anyone know how to suppress the errors and keep the loop running? I tried 'Off[General::stop]', but that doesn't seem to work.

-
Try Table[FindRoot[g[z], {z, j + k*I}], {j, 10}, {k, 10}]. Do will not produce any output, try Do[Do[1 + 1, {j, 10}], {k, 10}]. –  b.gatessucks Mar 12 '13 at 20:36

Off[FindRoot::nlnum]

Reap[Do[Do[Sow[FindRoot[g[z], {z, j + k*I}]], {j, 10}], {k, 10}]]