bugGNU Octave - Bugs: bug #40889, fzero ignores input option...

 
 

bug #40889: fzero ignores input option "OutputFcn"

Submitter:  None
Submitted:  Fri 13 Dec 2013 04:22:06 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Leo Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 14 Dec 2013 04:29:15 AM UTC, comment #1: 

Thanks for catching this.  I corrected the problem on the development branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/8ca7b1906a41).  It will take a while before the development branch is released.  In the mean time it's probably best to patch your own code locally.

Rik <rik5>
Group administrator
Fri 13 Dec 2013 04:22:06 PM UTC, original submission:  

The following two invocations of fzero produce the same result:


[f0,fval,info, output] = fzero(  @(x)besselj(1,x) , [3 5])



[f0,fval,info, output] = fzero(  @(x)besselj(1,x) , [3 5], optimset("OutputFcn", @sin))


showing that fzero ignores the function handle passed for the "OutputFcn" option (in the above the function "sin" is used only as an example; in real uses a properly behaving function will be used).

The expected behaviour can be recovered by changing the line 308 of fzero as follows:

from:


    if (outfcn)


to:


    if !isempty(outfcn)


Best regards,
Leo

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-18 siko1056 Dependencies- bugs #59901 is dependent
    2013-12-14 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code