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

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

[Octave-bug-tracker] [bug #63135] [octave forge] (optim) Optim package d


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #63135] [octave forge] (optim) Optim package does not find function handle
Date: Mon, 3 Oct 2022 14:42:59 -0400 (EDT)

Follow-up Comment #1, bug #63135 (project octave):

Not sure why the change in behavior happened, but I can get the intended
behavior to show up by changing the last line to use an anonymous function:

pkg load optim
function y = fitfun2(p,x)
   y=p(1)+p(2)*x;
end

x=rand(1,5); y=rand(1,5);
pinit=[0.1,0.1]';
[pfound]= nonlin_curvefit(@(a,b) fitfun2(a,b), pinit, x,y) 
pfound =

   0.6634
  -0.2519


Leaving this report open in case this change in behavior was not intended.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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