Merge pull request #408 from rattoma/master

allow asymmetric mode check plots
time-shift
Sébastien Villemot 2013-05-24 02:38:01 -07:00
commit 74ee859b37
2 changed files with 12 additions and 6 deletions

View File

@ -57,6 +57,7 @@ options_.solve_tolx = eps^(2/3);
options_.solve_maxit = 500;
options_.mode_check_neighbourhood_size = 0.5;
options_.mode_check_symmetric_plots = 1;
% Default number of threads for parallelized mex files.
options_.threads.kronecker.A_times_B_kronecker_C = 1;

View File

@ -85,6 +85,9 @@ if TeX
end
ll = DynareOptions.mode_check_neighbourhood_size;
if isinf(ll),
DynareOptions.mode_check_symmetric_plots = 0;
end
for plt = 1:nbplt,
if TeX
@ -108,12 +111,14 @@ for plt = 1:nbplt,
xx = x;
l1 = max(BayesInfo.lb(kk),(1-ll)*x(kk)); m1 = 0;
l2 = min(BayesInfo.ub(kk),(1+ll)*x(kk));
if l2<(1+ll)*x(kk)
l1 = x(kk) - (l2-x(kk));
m1 = 1;
end
if ~m1 && (l1>(1-ll)*x(kk)) && (x(kk)+(x(kk)-l1)<BayesInfo.ub(kk))
l2 = x(kk) + (x(kk)-l1);
if DynareOptions.mode_check_symmetric_plots,
if l2<(1+ll)*x(kk)
l1 = x(kk) - (l2-x(kk));
m1 = 1;
end
if ~m1 && (l1>(1-ll)*x(kk)) && (x(kk)+(x(kk)-l1)<BayesInfo.ub(kk))
l2 = x(kk) + (x(kk)-l1);
end
end
z1 = l1:((x(kk)-l1)/10):x(kk);
z2 = x(kk):((l2-x(kk))/10):l2;