fiminsearch only has two output args under Octave

time-shift
Houtan Bastani 2016-10-21 17:37:00 +02:00
parent f5f71ca838
commit 46cdaf8e0a
1 changed files with 3 additions and 2 deletions

View File

@ -274,9 +274,10 @@ switch minimizer_algorithm
if ~isoctave
[opt_par_values,fval,exitflag] = fminsearch(objective_function,start_par_value,optim_options,varargin{:});
else
% Under Octave, use a wrapper, since fminsearch() does not have a 4th arg
% Under Octave, use a wrapper, since fminsearch() does not have a
% 4th arg, and only has two output args
func = @(x) objective_function(x,varargin{:});
[opt_par_values,fval,exitflag] = fminsearch(func,start_par_value,optim_options);
[opt_par_values,fval] = fminsearch(func,start_par_value,optim_options);
end
case 8
% Dynare implementation of the simplex algorithm.