From 8474e671a7d634b470a0bc0d6eac38ccf2ee2a75 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx,de>
Date: Mon, 26 May 2014 16:16:22 +0200
Subject: [PATCH] Fix size of NaN vector returned so that resid.m does not
 crash

(cherry picked from commit 616dad634a2f97200d29003ef29898dc65fac167)
---
 matlab/dynare_solve.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/matlab/dynare_solve.m b/matlab/dynare_solve.m
index 61fda7244..2f49b0c34 100644
--- a/matlab/dynare_solve.m
+++ b/matlab/dynare_solve.m
@@ -75,7 +75,7 @@ if ~isempty(i)
     disp('   i) if all parameters occurring in these equations are defined')
     disp('  ii) that no division by an endogenous variable initialized to 0 occurs') 
     info = 1;
-    x = NaN;
+    x = NaN(size(fvec));
     return;
 end
 
-- 
GitLab