Adapted print_info routine.

time-shift
Stéphane Adjemian (Charybdis) 2013-06-12 10:54:33 +02:00
parent 9d3a1d242a
commit 8574dfd053
7 changed files with 13 additions and 13 deletions

View File

@ -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;

View File

@ -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

View File

@ -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)

View File

@ -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_;

View File

@ -113,7 +113,7 @@ if nargout == 0
end
if info(1)
print_info(info,options_.noprint)
print_info(info,options_.noprint, options_)
end

View File

@ -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;

View File

@ -78,7 +78,7 @@ end
if info(1)
options_ = options_old;
print_info(info, options_.noprint);
print_info(info, options_.noprint, options_);
return
end