Skip to content
Snippets Groups Projects
Commit 8713e46c authored by Marco Ratto's avatar Marco Ratto
Browse files

fixed bug with non-increasing time declarations of moment restrictions....

fixed bug with non-increasing time declarations of moment restrictions. Modified example to get more sensible graph of ACF.


(cherry picked from commit b0e7c47a)
parent 026c0699
Branches
Tags
1 merge request!1641Fixes 4.6
......@@ -394,6 +394,7 @@ if ~isempty(indx_moment)
% For single legend search which has maximum nbr of restrictions
maxijv=0;
for ij=1:nbr_moment_restrictions
endo_prior_restrictions.moment{ij,3} = sort(endo_prior_restrictions.moment{ij,3});
if length(endo_prior_restrictions.moment{ij,3})>maxijv
maxij=ij;maxijv=length(endo_prior_restrictions.moment{ij,3});
end
......@@ -477,6 +478,7 @@ if ~isempty(indx_moment)
% end
end
for ij=1:nbr_moment_couples
time_matrix{ij} = sort(time_matrix{ij});
if length(time_matrix{ij})>1
if ~DynareOptions.nograph
itmp = (find(plot_indx==ij));
......@@ -505,7 +507,7 @@ if ~isempty(indx_moment)
hold off
axis(a)
box on
set(gca,'xtick',sort(time_matrix{ij}))
% set(gca,'xtick',sort(time_matrix{ij}))
itmp = min(itmp);
title([endo_prior_restrictions.moment{itmp,1},' vs ',endo_prior_restrictions.moment{itmp,2}],'interpreter','none'),
end
......
......@@ -88,7 +88,7 @@ end;
moment_calibration;
//y_obs,y_obs, [0.8 1.1]; //[unconditional variance]
y_obs,y_obs(-(1:4)), +; //[first year acf]
y_obs,y_obs(1:4), +; //[first year acf]
//y_obs,pie_obs(-4:4), -; //[ccf]
@#for ilag in -2:2
y_obs,R_obs(@{ilag}), -; //[ccf]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment