diff --git a/matlab/check.m b/matlab/check.m index d68f7f641c4013c464b0c51885be087a0a451660..8c7ad94fff745ee8d6ccddb57ff50e7b86946de3 100644 --- a/matlab/check.m +++ b/matlab/check.m @@ -73,7 +73,7 @@ oo.dr=set_state_space(oo.dr,M,options); [dr,info,M,options,oo] = resol(1,M,options,oo); if info(1) ~= 0 && info(1) ~= 3 && info(1) ~= 4 - print_info(info, options.noprint); + print_info(info, options.noprint, options); end eigenvalues_ = dr.eigval; diff --git a/matlab/dyn_risky_steadystate_solver.m b/matlab/dyn_risky_steadystate_solver.m index 7f543790996e89b6b8a63703b89911447064831c..114e2c1b039008eb9af6e3c68839780532e0a990 100644 --- a/matlab/dyn_risky_steadystate_solver.m +++ b/matlab/dyn_risky_steadystate_solver.m @@ -271,7 +271,7 @@ function dr_np = first_step_ds(x,pm,M,dr,options,oo) [dr_np,info] = dyn_first_order_solver(d1_np,pm.M_np,pm.dr_np,options,0); if info - print_info(info,0); + print_info(info, 0, options); return end @@ -309,7 +309,7 @@ function [resid,dr] = risky_residuals_k_order(ys,pm,M,dr,options,oo) [dr_np,info] = dyn_first_order_solver(d1_np,pm.M_np,pm.dr_np,options,0); if info - print_info(info,0); + print_info(info, 0, options); return end @@ -386,7 +386,7 @@ function [resid,dr] = risky_residuals_k_order(ys,pm,M,dr,options,oo) disp(aa3(:,kk2)) [dr,info] = dyn_first_order_solver(d1b,M,dr,options,0); if info - print_info(info,0); + print_info(info, 0, options); return end diff --git a/matlab/initial_estimation_checks.m b/matlab/initial_estimation_checks.m index 673d8c3601fbfee2381d0e0c1d30fe97af52a32a..ac884f18328dcded472f27a41e9bfaa4f908a6ba 100644 --- a/matlab/initial_estimation_checks.m +++ b/matlab/initial_estimation_checks.m @@ -66,7 +66,7 @@ end if info(1) > 0 disp('Error in computing likelihood for initial parameter values') - print_info(info, DynareOptions.noprint) + print_info(info, DynareOptions.noprint, DynareOptions) end if any(abs(DynareResults.steady_state(BayesInfo.mfys))>1e-9) && (DynareOptions.prefilter==1) diff --git a/matlab/print_info.m b/matlab/print_info.m index 67bffa2644aa79f588654bb9505e8a6741a7b828..82f053a40a42be4beec553c1e6c53f552a780b98 100644 --- a/matlab/print_info.m +++ b/matlab/print_info.m @@ -1,9 +1,10 @@ -function print_info(info,noprint) +function print_info(info, noprint, DynareOptions) % Prints error messages % % INPUTS -% info [double] vector returned by resol.m -% noprint [integer] equal to 0 if the error message has to be printed. +% info [double] vector returned by resol.m +% noprint [integer] equal to 0 if the error message has to be printed. +% DynareOptions [structure] --> options_ % OUTPUTS % none % @@ -49,8 +50,7 @@ if ~noprint error(['The Jacobian matrix evaluated at the steady state contains elements ' ... 'that are not real or are infinite']) case 7 - error(['One of the eigenvalues is close to 0/0 (the absolute ' ... - 'value of numerator and denominator is smaller than 1e-6)']) + error('One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than %s!\n If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.',num2str(DynareOptions.qz_zero_threshold)) case 8 if size(info,2)>=2 global M_; diff --git a/matlab/resid.m b/matlab/resid.m index b8082b8e0cb933d52f1223f337bbdea32d54179d..807bb435f4407b9bb8cdea34a8d7c49704b4d23f 100644 --- a/matlab/resid.m +++ b/matlab/resid.m @@ -113,7 +113,7 @@ if nargout == 0 end if info(1) - print_info(info,options_.noprint) + print_info(info,options_.noprint, options_) end diff --git a/matlab/steady.m b/matlab/steady.m index 24456b0289729fcd62a346ab71201f9f01ce4213..510d1f89f9fa597055fafb9952e108846937c4a1 100644 --- a/matlab/steady.m +++ b/matlab/steady.m @@ -89,7 +89,7 @@ else if options_.noprint == 0 resid; end - print_info(info,options_.noprint); + print_info(info,options_.noprint, options_); end M_.Sigma_e = Sigma_e; diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m index e06b413bb99fa78ce94e7d320a24d97ef5e54ac2..b6540e7372ce81dbd20d72e267b7d75b048a0af6 100644 --- a/matlab/stoch_simul.m +++ b/matlab/stoch_simul.m @@ -78,7 +78,7 @@ end if info(1) options_ = options_old; - print_info(info, options_.noprint); + print_info(info, options_.noprint, options_); return end