bugGNU Octave - Bugs: bug #46808, Convergence problems????

 
 

bug #46808: Convergence problems????

Submitted by:  None
Submitted on:  Mon 04 Jan 2016 10:23:53 AM UTC  
 
Category: Octave FunctionSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: Kai Torben Ohlhus <siko1056>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.0
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 04 Jan 2016 03:23:22 PM UTC, comment #1:

According to the documentation

https://www.gnu.org/software/octave/doc/interpreter/Solvers.html#XREFfzero

"x0 should be a two-element vector specifying two points which bracket a zero."

"If x0 is a single scalar then several nearby and distant values are probed in an attempt to obtain a valid bracketing. If this is not successful, the function fails."

For you the second quote failed. Maybe MATLAB implements a smarter guessing bracketing strategy. If you try the first quote to your example:

you get the very same result.

Kai Torben Ohlhus <siko1056>
Project MemberIn charge of this item.
Mon 04 Jan 2016 10:23:53 AM UTC, original submission:

Solving with fzero this function using two different seeds and obtaining a correct result and a 'not a valid initial bracketing':

>> f=inline('sin(beta-0.361)+sin(0.361)*exp(-beta/0.377)','beta');
>> fzero(f, pi) % ok

ans = 3.50262524454451

>> fzero(f, pi/2) % ERROR ¿convergence problem???

error: fzero: not a valid initial bracketing
error: called from
fzero at line 176 column 5

But it is a smooth function, and therefore using MATLAB not reported any error. You can plot the function with:

>> fplot(f,[-pi, pi]);


Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by siko1056 (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 04 Jan 2016 03:23:22 PM UTCsiko1056Severity3 - Normal=>2 - Minor
      Item GroupNone=>Incorrect Result
      StatusNone=>Invalid
      Assigned toNone=>siko1056
      Open/ClosedOpen=>Closed
      Operating SystemMicrosoft Windows=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1