I want to handle FindRoot calls which did not converge (e.g "thrown" error message FindRoot::cvmit)
sols = Table[FindRoot[some equations dependant in a, startSolutions],
{a, minA, maxA, stepSize}]
For some, FindRoot will not converge (3000 iterations). Is there a way to define the entry of sol in this case to e.g. NAN?
EDIT:
Is there a possibility to break further evaluation of the Table call, if Check[] returns a defined value?
Break[] is only allowed in For[], While[] and Do[] - so do I have to encapsulate my FindRoot call in an extra loop and construct the table by hand?
e.g.:
(** apply solver and Check[] if jacobian gets singular **)
sols = {};
For[Alpha = minAlpha, Alpha <= maxAlpha, Alpha += stepSize,
Append[sols, Check[solver, {Alpha, Break[]}, {FindRoot::jsing}]]];
Unfortunately this does not work...
Throws something at you? You ... ;). Perhaps you could try working with this new information and try to update your question with what you've tried and where you're getting stuck? You might also want to take a look atCheck– rm -rf♦ Mar 21 '12 at 16:56Duckfunction... – Brett Champion Mar 21 '12 at 19:43Tableinstead of editing this old question. It's not possible to break from aTableand preserve all results comuted so far (it's possible to break usingThrowand discard results). I'd recommend usingSow/Reapin aDoloop instead. – Szabolcs Apr 19 '12 at 15:23