   61, f(x) = 5.891340e+02, ||grad||_infty = 5.58e-03
</pre><h2 id="6">Check the output</h2><p>It's important to check the output of the optimization method. In particular, it's worthwhile to check the exit message.</p><pre class="codeinput">exitmsg = output.ExitMsg
</pre><pre class="codeoutput">
exitmsg =

    'CONVERGENCE: REL_REDUCTION_OF_F_&lt;=_FACTR*EPSMCH.'

</pre><p>The fit is the percentage of the data that is explained by the model. Because we have noise, we do not expect the fit to be perfect.</p