From 505ed643a156108303798b63a8c37374694a0808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 13 Oct 2010 18:52:07 +0200 Subject: [PATCH] Fix for computing 1st order irf of purely forward models --- matlab/irf.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/matlab/irf.m b/matlab/irf.m index 5a5524237..f436686c9 100644 --- a/matlab/irf.m +++ b/matlab/irf.m @@ -17,7 +17,7 @@ function y = irf(dr, e1, long, drop, replic, iorder) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2008 Dynare Team +% Copyright (C) 2003-2010 Dynare Team % % This file is part of Dynare. % @@ -37,7 +37,11 @@ function y = irf(dr, e1, long, drop, replic, iorder) global M_ oo_ options_ -temps = repmat(dr.ys,1,M_.maximum_lag); +if M_.maximum_lag >= 1 + temps = repmat(dr.ys,1,M_.maximum_lag); +else + temps = zeros(M_.endo_nbr, 1); % Dummy values for purely forward models +end y = 0; if iorder == 1