Skip to content
Snippets Groups Projects
Verified Commit cbef92f4 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Octave compatibility fix: the 3rd output argument to fminsearch was added in Octave 4.4

(cherry picked from commit e4136962)
parent 7fbcb519
Branches
Tags
No related merge requests found
...@@ -353,9 +353,9 @@ switch minimizer_algorithm ...@@ -353,9 +353,9 @@ switch minimizer_algorithm
[opt_par_values,fval,exitflag] = fminsearch(objective_function,start_par_value,optim_options,varargin{:}); [opt_par_values,fval,exitflag] = fminsearch(objective_function,start_par_value,optim_options,varargin{:});
else else
% Under Octave, use a wrapper, since fminsearch() does not have a % Under Octave, use a wrapper, since fminsearch() does not have a
% 4th arg, and only has two output args % 4th arg.
func = @(x) objective_function(x,varargin{:}); func = @(x) objective_function(x,varargin{:});
[opt_par_values,fval] = fminsearch(func,start_par_value,optim_options); [opt_par_values,fval,exitflag] = fminsearch(func,start_par_value,optim_options);
end end
case 8 case 8
% Dynare implementation of the simplex algorithm. % Dynare implementation of the simplex algorithm.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment