diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index 60edfb505..a37a89d40 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -353,7 +353,7 @@ if ~options_.mh_posterior_mode_estimation && options_.cova_compute end if options_.mode_check == 1 && ~options_.mh_posterior_mode_estimation - mode_check('objective_function',xparam1,hh,dataset_,options_,M_,estim_params_,bayestopt_,oo_); + mode_check(objective_function,xparam1,hh,dataset_,options_,M_,estim_params_,bayestopt_,oo_); end if ~options_.mh_posterior_mode_estimation diff --git a/matlab/mode_check.m b/matlab/mode_check.m index 8e14a3e20..36d516c89 100644 --- a/matlab/mode_check.m +++ b/matlab/mode_check.m @@ -1,4 +1,4 @@ -function mode_check(func,x,fval,hessian,DynareDataset,DynareOptions,Model,EstimatedParameters,BayesInfo,DynareResults) +function mode_check(fun,x,hessian,DynareDataset,DynareOptions,Model,EstimatedParameters,BayesInfo,DynareResults) % function mode_check(x,fval,hessian,gend,data,lb,ub) % Checks the maximum likelihood mode @@ -91,7 +91,7 @@ for plt = 1:nbplt, end for i=1:length(z) xx(kk) = z(i); - [fval, exit_flag] = feval(fun,x,DynareDataset,DynareOptions,Model,EstimatedParameters,BayesInfo,DynareResults); + [fval, exit_flag] = feval(fun,xx,DynareDataset,DynareOptions,Model,EstimatedParameters,BayesInfo,DynareResults); if exit_flag y(i,1) = fval; else