bugGNU Octave - Bugs: bug #31383, optimset.m does not set options...

 
 

bug #31383: optimset.m does not set options being a cell-array correctly

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Wed 20 Oct 2010 08:16:32 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 21 Oct 2010 12:52:38 AM UTC, comment #1:

I added a ChangeLog entry and checked in the change. In the future, please include a ChangeLog entry with patches you submit.
Thanks.

John W. Eaton <jwe>
Project Administrator
Wed 20 Oct 2010 08:16:32 AM UTC, original submission:

If an option is a cell-array, optimset does not set it correctly. The reason is that optimset uses struct() for setting options. A tiny changeset is attached. Example, first of incorrect, than of correct (with the change) behavior:

octave:2> old_optimset ("a", 0, "b", {})
warning: function name `optimset' does not agree with function file name `/home/olaf/devel/src/octave/scripts/optimization/old_optimset.m'
warning: unrecognized option: a
warning: unrecognized option: b
ans =
{
a = {}(0x0)
b = {}(0x0)
}

octave:3> optimset ("a", 0, "b", {})
warning: unrecognized option: a
warning: unrecognized option: b
ans =
{
a = 0
b = {}(0x0)
}

octave:4>

Olaf Till <i7tiol>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21730:  optimset.changeset added by i7tiol (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by i7tiol (Submitted the item)
  •  

    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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Oct 2010 12:53:01 AM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 20 Oct 2010 08:16:32 AM UTCi7tiolAttached File-=>Added optimset.changeset, #21730

    Back to the top


    Powered by Savane 3.1-cleanup1