From: Manthos Vogiatzoglou on

Can anyone tell me how I could get the parameters vector that caused the objective function to return a complex number or a NaN, with fmincon or fminunc? I work with R2008b and R2009a.
Thanks in advance.
From: Alan Weiss on
Manthos Vogiatzoglou wrote:
>
> Can anyone tell me how I could get the parameters vector that caused the
> objective function to return a complex number or a NaN, with fmincon or
> fminunc? I work with R2008b and R2009a.
> Thanks in advance.
You can use an output function to give information on many aspects of
solver iterations. See
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-56.html
and
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/f19175.html#f11022

You can also set the FunValCheck option to 'on', but that might not give
you the details you seek.

Alan Weiss
MATLAB mathematical toolbox documentation