bugGNU Octave - Bugs: bug #65552, fminbnd can accept extra...

 
 

bug #65552: fminbnd can accept extra parameters to functions in matlab

Submitter:  Andy Adler <andy_adler>
Submitted:  Wed 03 Apr 2024 12:54:09 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Undocumented Matlab
Status:  Duplicate Assigned to:  None
Originator Name:  Andy Adler Open/Closed:  * Closed
Release:  * 9.1.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 03 Apr 2024 01:21:23 PM UTC, comment #1: 

Closing as duplicate of bug #46807 (which was itself closed as "Won't fix").

Markus Mützel <mmuetzel>
Group administrator
Wed 03 Apr 2024 12:54:09 PM UTC, original submission:  

In matlab, fmin* functions accept an extra parameters to the functions
   fminbnd(@(x,a,b) sin(x+a+b),2,6,struct(),1,-2)
(This is undocumented in current releases, but has been accepted for a long time)

In order to support this in octave, we need the following patch:

:share/octave/9.1.0/m/optimization$ diff fminbnd.m fminbnd-old.m
91c91
< function [x, fval, info, output] = fminbnd (fcn, a, b, options = struct (), varargin = {})
---

> function [x, fval, info, output] = fminbnd (fcn, a, b, options = struct ())

123c123
<     fcn = @(x) guarded_eval (fcn, x, varargin{:});
---

>     fcn = @(x) guarded_eval (fcn, x);

135c135
<   fv = fw = fval = fcn (x, varargin{:});
---

>   fv = fw = fval = fcn (x);

202c202
<     fu = fcn (u, varargin{:});
---

>     fu = fcn (u);


Andy Adler <andy_adler>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by andy_adler (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 group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-04-04 nrjank Dependencies- Depends on bugs #55742
    2024-04-03 mmuetzel StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #46807

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code