From 8c410350f9fcd00033058bfcc466a69fd6eab4a9 Mon Sep 17 00:00:00 2001
From: Michel Juillard <michel.juillard@mjui.fr>
Date: Thu, 1 Nov 2012 14:41:16 +0100
Subject: [PATCH] fixing occasional bug in local approximation when not all
 variables are present at the current period

---
 matlab/dyn_first_order_solver.m | 1 +
 1 file changed, 1 insertion(+)

diff --git a/matlab/dyn_first_order_solver.m b/matlab/dyn_first_order_solver.m
index d251bf686..6ca27ee23 100644
--- a/matlab/dyn_first_order_solver.m
+++ b/matlab/dyn_first_order_solver.m
@@ -95,6 +95,7 @@ function [dr,info] = dyn_first_order_solver(jacobia,M_,dr,options,task)
     end
     k1 = find([1:klen] ~= M_.maximum_endo_lag+1);
     a = aa(:,nonzeros(lead_lag_incidence(k1,:)'));
+    b = zeros(M_.endo_nbr,M_.endo_nbr);
     b(:,cols_b) = aa(:,cols_j);
     b10 = b(1:nstatic,1:nstatic);
     b11 = b(1:nstatic,nstatic+1:end);
-- 
GitLab