Commit 8574dfd0 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Adapted print_info routine.

parent 9d3a1d24
......@@ -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;
......
......@@ -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
......
......@@ -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)
......
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_;
......
......@@ -113,7 +113,7 @@ if nargout == 0
end
if info(1)
print_info(info,options_.noprint)
print_info(info,options_.noprint, options_)
end
......
......@@ -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;
......@@ -78,7 +78,7 @@ end
if info(1)
options_ = options_old;
print_info(info, options_.noprint);
print_info(info, options_.noprint, options_);
return
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment