octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61801] [octave forge] (optim) lsqnonlin and f


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #61801] [octave forge] (optim) lsqnonlin and fmincon test failures
Date: Sat, 9 Apr 2022 18:35:18 -0400 (EDT)

Follow-up Comment #9, bug #61801 (project octave):

I confirm that as well. For some reason my struct package was broken
internally but was reporting itself as being good. I reinstalled it manually
and added mmuetzel's patch in bug #61582 and now I get the same error that
you're getting, for both 7.1.0 and 8.0 dev.


octave:5> test fmincon
***** test
 ## equality constraint
 objective_function = @ (p) p(1)^2 + p(2)^2;
 pin = [-2; 5];
 constraint_function = @ (p) - (p(1)^2 + 1 - p(2));
 [p, objf, cvg, outp] = fmincon (objective_function, pin, [], [], [], [], [],
[], @ (p) {[], constraint_function(p)}{:}, optimset ("Algorithm",
"lm_feasible"));
 assert (p, [0; 1], 1e-6)
!!!!! test failed
@<anonymous>: function called with too many inputs


octave:6> test lsqnonlin 
***** test
 t = [0 .3 .8 1.1 1.6 2.3];
 y = [.82 .72 .63 .60 .55 .50];
 yhat = @(c,t) c(1) + c(2)*exp(-t);
 opt = optimset('TolFun',1e-10);
 [c,resnorm,residual] = lsqnonlin(@(c)yhat(c,t)-y,[1 1],[0 0],[],opt);
 assert (c, [ 0.47595; 0.34132], 1e-5)
 assert (resnorm, 3.2419e-004, 1e-8)
 assert(residual, [-2.7283e-003, 8.8079e-003, -6.8307e-004, -1.0432e-002,
-5.1366e-003, 1.0172e-002], 1e-5)
!!!!! test failed
@<anonymous>: function called with too many inputs




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61801>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]