patchGNU Octave - Patches: patch #8901, fminsearch support for more...


patch #8901: fminsearch support for more options and more output arguments

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Wed 03 Feb 2016 12:48:01 PM UTC
Category:  Core : other Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup

Tue 12 Jul 2016 01:09:21 AM UTC, comment #5: 

OK, I'm closing it as "won't do".

Lachlan Andrew <lachlan>
Mon 11 Jul 2016 05:06:54 PM UTC, comment #4: 

Lachlan, I split the patch into two pieces and posted them as changesets at bug #41888 and bug #44220.

There is no reason to keep this patch number open any more.

Markus Mützel <mmuetzel>
Group administrator
Wed 06 Jul 2016 08:33:43 PM UTC, comment #3: 

Sorry, Lachlan, for having created such a mess with this kind of patch. I think this was the first time, I created a Mercurial changeset. I will try and tidy up by submitting the matching parts of this patch to the respective bug reports but that might take some days.

The attached m-file indeed is the one that should result after the patch has been applied and posting it was thus un-necessary.

Markus Mützel <mmuetzel>
Group administrator
Wed 06 Jul 2016 01:43:01 PM UTC, comment #2: 

Markus, in general it is good to submit patches for bugs on the bug tracker.  The patch tracker doesn't get looked at much, and is mainly for new features that aren't bug fixes.

Is there a need to have a single patch addressing two bugs?  It is easier to maintain if each patch addresses a single bug.  That also allows the standard format for the first line of the commit message:

Description of change (bug #.....)

If possible, could you please split this patch into the part that fixes each bug, and submit the parts under the different bug reports?

I'm not sure why you attached both fminsearch.patch and fminsearch.m.  Is the .m version the file once the patch has been applied?

If the extra bug that the patch fixes is small, the in is probably OK just to document it in the comments of one of the other bug reports.  However, if it is substantial, then it should have its own report.

Lachlan Andrew <lachlan>
Tue 01 Mar 2016 09:31:49 AM UTC, comment #1: 

The attached patch fixes an old bug that was triggered when "FunValCheck" was set to "on". I added some tests for this specific case.
Should I file a bug report for this? The bug also exists in the current stable branch and in the 4.0.0 release.

Additionally, I changed the demo w.r.t. the prior patch for one that employs "OutputFcn" that is used to plot the convergence process. Thank you to the developers of fminsearch in the interval package for the inspiration.

Other than that, I added some line breaks in very long lines.

(file #36518, file #36519)

Markus Mützel <mmuetzel>
Group administrator
Wed 03 Feb 2016 12:48:01 PM UTC, original submission:  

This patch fixes bug #44220 (fminsearch >2 output arguments) and bug #41888 (fminsearch: should pass additional arguments to called function). The doubts in should also be addressed and I added some tests for the syntax in
Additionally, it implements the other FIXMEs from the list  below the help text.

I left the search algorithm untouched so that it should be save to apply this patch.

The Mathworks documentation for OutputFcn ([1]) states that it can be called with the state "interrupt". But I do not understand when this happens and I cannot test since this seems not to be available in R2012a. Thus, with this patch the output function will not be called with this state.
I tried the examples given on [1] and they seem to work. I had to change "Example of a Nested Output Function" since handles to nested functions do not work in Octave (see attached myproblem.m).


Markus Mützel <mmuetzel>
Group administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #36518:  fminsearch.patch added by mmuetzel (14KiB - application/octet-stream)
file #36519:  fminsearch.m added by mmuetzel (15KiB - text/x-objective-c)
file #36505:  fminsearch.m added by mmuetzel (14KiB - text/x-objective-c)
file #36240:  fminsearch.patch added by mmuetzel (13KiB - application/octet-stream)
file #36241:  myproblem.m added by mmuetzel (415B - text/x-objective-c)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by lachlan (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-12 lachlan StatusNone Wont Do
        Open/ClosedOpen Closed
    2016-07-07 lachlan CategoryNone Core : other
    2016-03-01 mmuetzel Attached File- Added fminsearch.patch, #36518
        Attached File- Added fminsearch.m, #36519
    2016-02-29 mmuetzel Attached File- Added fminsearch.m, #36505
    2016-02-03 mmuetzel Attached File- Added fminsearch.patch, #36240
        Attached File- Added myproblem.m, #36241

    Back to the top

    Powered by Savane 3.13-c54d.
    Corresponding source code