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

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

[Octave-bug-tracker] [bug #55742] fminsearch does not pass extra argumen


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #55742] fminsearch does not pass extra arguments to objective function, undocumented old Matlab behavior
Date: Wed, 20 Feb 2019 01:23:58 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36

Update of bug #55742 (project octave):

                Severity:              3 - Normal => 2 - Minor              
                Priority:              5 - Normal => 3 - Low                
                  Status:                    None => Confirmed              
                 Summary: Related to bug #41888, fix not quite working yet--
crashes at the very end of the search. => fminsearch does not pass extra
arguments to objective function, undocumented old Matlab behavior

    _______________________________________________________

Follow-up Comment #1:

Confirmed, this is because of the final call to 'fun' for the 'fval' second
return value. So in Octave 4.4, confirmed that this error occurs when calling
fminsearch with two output arguments and an optional argument passed to the
function.

As documented elsewhere, the best way to pass auxiliary arguments to your
objective function is to use an anonymous function, for example in the
attached fminsearchBugTest2.m.

Moreover, in the changes made for Octave 5 since 4.4, it looks to me like the
functionality added in bug #41888 has been broken in revision a00379f6f8c4
(https://hg.savannah.gnu.org/hgweb/octave/rev/a00379f6f8c4), probably
accidentally. So this is a bigger bug, but is it worth fixing (again)? As
mentioned earlier on bug #41888, this calling syntax is not documented Matlab
behavior, do we need to continue supporting this when anonymous functions
works far better and more flexibly?

(file #46311)
    _______________________________________________________

Additional Item Attachment:

File name: fminsearchBugTest2.m           Size:0 KB
    <https://savannah.gnu.org/file/fminsearchBugTest2.m?file_id=46311>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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