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

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

[Octave-bug-tracker] [bug #35534] fminunc: FunValCheck buggy


From: Olaf Till
Subject: [Octave-bug-tracker] [bug #35534] fminunc: FunValCheck buggy
Date: Wed, 15 Feb 2012 13:44:01 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20111108 Iceweasel/3.5.16 (like Firefox/3.5.16)

URL:
  <http://savannah.gnu.org/bugs/?35534>

                 Summary: fminunc: FunValCheck buggy
                 Project: GNU Octave
            Submitted by: i7tiol
            Submitted on: Wed 15 Feb 2012 01:44:00 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: Olaf Till
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

In current tip on the default branch (721a4a83cba6, 2012-02-14), fminunc.m
does not work if the option "FunValCheck" is set to "on".


octave:1> fminunc (@ (x) x^2, 1, optimset ("FunValCheck", "on"))
error: `jx' undefined near line 353 column 33
error: evaluating argument list element number 1
error: called from:
error:   /home/olaf/devel/src/octave/scripts/optimization/fminunc.m at line
353, column 3
error:   /home/olaf/devel/src/octave/scripts/optimization/fminunc.m at line
149, column 6


This is due to a typo (probably after copy-and-paste from fsolve), jx is the
gradient returned by the user function and should be named gx here. After
correcting this:


octave:1> fminunc (@ (x) x^2, 1, optimset ("FunValCheck", "on"))
error: `complexeqn' undefined near line 355 column 11
error: called from:
error:   /home/olaf/devel/src/octave/scripts/optimization/fminunc.m at line
353, column 3
error:   /home/olaf/devel/src/octave/scripts/optimization/fminunc.m at line
149, column 6


This is again probably due to a copy-and-paste mistake, the option
"ComplexEqn" is not applicable to fminunc (it expects a real scalar returned
by the user function) and these two lines with the test should be deleted.

A small patch will be attached in the next comment, I want to get the bug
number first.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35534>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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