[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55742] Related to bug #41888, fix not quite w
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #55742] Related to bug #41888, fix not quite working yet-- crashes at the very end of the search. |
Date: |
Tue, 19 Feb 2019 23:21:50 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 |
URL:
<https://savannah.gnu.org/bugs/?55742>
Summary: Related to bug #41888, fix not quite working yet--
crashes at the very end of the search.
Project: GNU Octave
Submitted by: None
Submitted on: Wed 20 Feb 2019 04:21:48 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error
Status: None
Assigned to: None
Originator Name: AlanStr
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.4.1
Operating System: Any
_______________________________________________________
Details:
It is wonderful that you acted on bug #41888 and added the matlab feature to
fminsearch, where you can pass additional parameters to the function that can
then be passed through fminsearch as additional arguments at the end of the
call.
My application is quite complex, but here I have boiled it down to a fairly
short example.
Main script file, which I called fminsearchBugTest1
% We will minimize the function f(x)=2+(x-2.0)^2+(y-3.0)^2
% but we will pass the 2.0 and 3.0 through an additional
% parameter called dataStructure.
dataStructure{1}=2.0;
dataStructure{2}=3.0;
beta0=[1.5 2.8];
[beta,fval] = fminsearch('fminsearchBugTestFunction',beta0, ...
optimset('TolX',1e-6,'TolFun',1e-6,'Display','iter','MaxIter',20000,'MaxFunEvals',40000),dataStructure);
Next we define the function that we will minimize. I called it
fminsearchBugTestFunction:
function [s]=fminsearchBugTestFunction(beta, dataStructure)
%dataStructure is a paramter of the function
s=2.0+(beta(1)-dataStructure{1})^2+(beta(2)-dataStructure{2})^4;
fprintf('%9.6f\t%9.6f\n',beta);
endfunction
Test this in Release 4.4.1. For me it shows the search proceeding all the way
to the end, and then at the end it crashes and reports
error: 'dataStructure' undefined near line 3 column 18
error: called from
fminsearchBugTestFunction at line 3 column 4
fminsearch at line 105 column 10
fminsearchBugTest1 at line 10 column 12
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 20 Feb 2019 04:21:48 AM UTC Name: fminsearchBugTest1.m Size: 797B
By: None
<http://savannah.gnu.org/bugs/download.php?file_id=46309>
-------------------------------------------------------
Date: Wed 20 Feb 2019 04:21:48 AM UTC Name: fminsearchBugTestFunction.m
Size: 223B By: None
<http://savannah.gnu.org/bugs/download.php?file_id=46310>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55742>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55742] Related to bug #41888, fix not quite working yet-- crashes at the very end of the search.,
anonymous <=
- [Octave-bug-tracker] [bug #55742] fminsearch does not pass extra arguments to objective function, undocumented old Matlab behavior, Mike Miller, 2019/02/20
- [Octave-bug-tracker] [bug #55742] fminsearch does not pass extra arguments to objective function, undocumented old Matlab behavior, anonymous, 2019/02/20
- [Octave-bug-tracker] [bug #55742] fminsearch does not pass extra arguments to objective function, undocumented old Matlab behavior, Rik, 2019/02/20
- [Octave-bug-tracker] [bug #55742] fminsearch does not pass extra arguments to objective function, undocumented old Matlab behavior, Mike Miller, 2019/02/20
- [Octave-bug-tracker] [bug #55742] fminsearch does not pass extra arguments to objective function, undocumented old Matlab behavior, Mike Miller, 2019/02/20
- [Octave-bug-tracker] [bug #55742] fminsearch does not pass extra arguments to objective function, undocumented old Matlab behavior, anonymous, 2019/02/20
- [Octave-bug-tracker] [bug #55742] fminsearch does not pass extra arguments to objective function, undocumented old Matlab behavior, Rik, 2019/02/20