[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields
From: |
Olaf Till |
Subject: |
[Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new' |
Date: |
Sun, 4 Nov 2018 07:11:16 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
URL:
<https://savannah.gnu.org/bugs/?54952>
Summary: optimset (old, new) uses empty fields from 'new'
Project: GNU Octave
Submitted by: i7tiol
Submitted on: Sun 04 Nov 2018 12:11:14 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
With option structures 'old' and 'new',
optimset (old, new)
should return an option structure with all fields of 'old', set to the values
of the respective fields in 'new' if they are present and _non-empty_ in
'new'. This is so according to Matlab documentation:
options = optimset(oldopts,newopts) combines an existing options structure
oldopts with a new options structure newopts. Any parameters in newopts with
nonempty values overwrite the corresponding old parameters in oldopts.
, and it should be so according to a comment in Octaves
scripts/optimization/optimset.m:
elseif (nargs == 2 && isstruct (varargin{1}) && isstruct (varargin{2}))
## Set slots in old from non-empties in new.
, but in fact Octaves optimset even uses _empty_ fields in 'new'. This makes
correct merging of defaults with given options awkward (in the optim
package).
I've checked that fixing this wouldn't affect any Octave function under
scripts/optimization/ .
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54952>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new',
Olaf Till <=
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Olaf Till, 2018/11/04
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Olaf Till, 2018/11/04
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Rik, 2018/11/04
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Olaf Till, 2018/11/04
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Kai Torben Ohlhus, 2018/11/24
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Rik, 2018/11/24
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Kai Torben Ohlhus, 2018/11/25
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Kai Torben Ohlhus, 2018/11/25
- [Octave-bug-tracker] [bug #54952] optimset (old, new) uses empty fields from 'new', Kai Torben Ohlhus, 2018/11/26