From 2d6e51373813feba80c3aefc380b200893fd605c Mon Sep 17 00:00:00 2001 From: Marco Ratto Date: Tue, 10 Dec 2013 10:54:47 +0100 Subject: [PATCH] Bug fix with irf restriction on period larger than 1 --- matlab/endogenous_prior_restrictions.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matlab/endogenous_prior_restrictions.m b/matlab/endogenous_prior_restrictions.m index 981adbd6d..e28a726ae 100644 --- a/matlab/endogenous_prior_restrictions.m +++ b/matlab/endogenous_prior_restrictions.m @@ -42,11 +42,11 @@ end infos=[0 0]; varlist=Model.endo_names(DynareResults.dr.order_var,:); varlist=varlist(DynareResults.dr.restrict_var_list,:); -T=1; +NT=1; for j=1:size(endo_prior_restrictions.irf,1), - T=max(T,endo_prior_restrictions.irf{j,3}); + NT=max(NT,endo_prior_restrictions.irf{j,3}); end -for t=1:T, +for t=1:NT, RR = T^(t-1)*R; for j=1:size(endo_prior_restrictions.irf,1), if endo_prior_restrictions.irf{j,3}~=t,