help-octave
[Top][All Lists]
Advanced

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

Re: Issue with fminsearch function


From: Doug Stewart
Subject: Re: Issue with fminsearch function
Date: Tue, 10 Sep 2019 17:49:27 -0400



On Tue, Sep 10, 2019 at 5:23 PM Joel Lapin <address@hidden> wrote:
Hello Octave

I am using fminsearch to optimize 2 parameters, which are fed to the function of interest as a 2 unit row vector -> [# #]. When I run fminsearch I get the following error message:

>> fminsearch('test', [0,1])
error: fun(0): subscripts must be either integers 1 to (2^63)-1 or logicals
error: called from
    fminsearch>nmsmax at line 275 column 8
    fminsearch at line 165 column 25

If I debug and go into the function, the issue appears at line 275

275: f(1) = dirn * fun (x, varargin{:});

the variable fun is literally the string 'test' and hence the indexing issue. Is there a bug in the fminsearch function?

Thank you in advance
Joel
 


did you make a variable called fun?



--
DASCertificate for 206392


reply via email to

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