Mercurial > hg > octave-nkf
changeset 14383:07c55bceca23 stable
Fix guarded_eval() subfunction in fminunc (bug #35534).
* fminunc.m: Fix guarded_eval() subfunction in fminunc (bug #35534).
author | Olaf Till <olaf.till@uni-jena.de> |
---|---|
date | Wed, 15 Feb 2012 14:44:37 +0100 |
parents | cb4f1915db92 |
children | 4e8f1d1b0d75 ba4d6343524b |
files | scripts/optimization/fminunc.m |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/optimization/fminunc.m +++ b/scripts/optimization/fminunc.m @@ -350,10 +350,8 @@ gx = []; endif - if (! (isreal (fx) && isreal (jx))) + if (! (isreal (fx) && isreal (gx))) error ("fminunc:notreal", "fminunc: non-real value encountered"); - elseif (complexeqn && ! (isnumeric (fx) && isnumeric(jx))) - error ("fminunc:notnum", "fminunc: non-numeric value encountered"); elseif (any (isnan (fx(:)))) error ("fminunc:isnan", "fminunc: NaN value encountered"); endif