0
Fixed

Error in fsolve

rdlp 2 months ago updated by Pavel Holoborodko 2 months ago 1

Running your example function for fsolve I get the following error:


Not enough input arguments.

Error in validateFinDiffRelStep (line 10)
value = optimget(options,'FinDiffRelStep',defaultopt,optimgetFlag);

Error in mpfsolve

Error in mp/fsolve (line 5717)
[varargout{1:nargout}] = mpfsolve(varargin{:});

Error in test_fsolve (line 7)
[x,fval,exitflag,output] = fsolve(@myfun,x0,options)

test_fsolve is directly copied from your documentation:

function test_fsolvex0 = mp([-5; -5]);

options = optimset('Display','iter', 'TolFun', mp('eps'),... 'TolX', mp('eps'),... 'Algorithm','levenberg-marquardt'); [x,fval,exitflag,output] = fsolve(@myfun,x0,options) 

function F = myfun(x) 

F = [2*x(1) - x(2) - exp(-x(1)); -x(1) + 2*x(2) - exp(-x(2))]; 

end

end

My matlab version is 2023b version 8.

Answer

Answer
Fixed

Thank you very much for the bug report!

Since R2023b the 'validateFinDiffRelStep' has been updated to accept 4 arguments instead of 3 (as it was before).

Indeed this incompatibility has slipped through our tests.

The toolbox has been updated with the incompatibility fixed. Please re-download & update the toolbox.

We haven't changed the toolbox version number (it is still 5.2.8.15537) but relevant files have been replaced and updated.

Answer
Fixed

Thank you very much for the bug report!

Since R2023b the 'validateFinDiffRelStep' has been updated to accept 4 arguments instead of 3 (as it was before).

Indeed this incompatibility has slipped through our tests.

The toolbox has been updated with the incompatibility fixed. Please re-download & update the toolbox.

We haven't changed the toolbox version number (it is still 5.2.8.15537) but relevant files have been replaced and updated.