changeset 29398:a603c9fac000

maint: merge stable to default.
author Rik <rik@octave.org>
date Mon, 01 Mar 2021 09:46:19 -0800
parents b03104e38964 (current diff) ce425b657693 (diff)
children 019130bd4a3d
files scripts/optimization/fsolve.m
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/optimization/fsolve.m	Sun Feb 28 18:37:34 2021 +0100
+++ b/scripts/optimization/fsolve.m	Mon Mar 01 09:46:19 2021 -0800
@@ -256,6 +256,10 @@
     stop = outfcn (x, optimvalues, state);
     if (stop)
       info = -1;
+      output.iterations = niter;
+      output.successful = 0;
+      output.funcCount = nfev;
+      fjac = NaN;
       return;
     endif
   endif
@@ -431,6 +435,9 @@
         stop = outfcn (x, optimvalues, state);
         if (stop)
           info = -1;
+          output.iterations = niter;
+          output.successful = nsuciter;
+          output.funcCount = nfev;
           break;
         endif
       endif