[Top][All Lists]

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

Issue with fminsearch function

From: Joel Lapin
Subject: Issue with fminsearch function
Date: Tue, 10 Sep 2019 14:15:16 -0400

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

reply via email to

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