From 906bf8e02feb8370153bc6407bf95d2592be3cc2 Mon Sep 17 00:00:00 2001
From: Marco Ratto <marco.ratto@jrc.ec.europa.eu>
Date: Sun, 15 Jul 2012 22:15:06 +0200
Subject: [PATCH] Fixed random bug of MC identification test, occurring when
 there is no solution at the very first iteration of the MC loop.

---
 matlab/dynare_identification.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/matlab/dynare_identification.m b/matlab/dynare_identification.m
index 46d75d1b8c..f12a0a5e98 100644
--- a/matlab/dynare_identification.m
+++ b/matlab/dynare_identification.m
@@ -296,7 +296,7 @@ if iload <=0,
         end
         [dum1, ideJ, ideH, ideGP, dum2 , info] = ...
             identification_analysis(params,indx,indexo,options_MC,dataset_, prior_exist, name_tex,0);
-        if iteration==0,
+        if iteration==0 && info(1)==0,
             MAX_tau   = min(SampleSize,ceil(MaxNumberOfBytes/(size(ideH.siH,1)*nparam)/8));
             stoH = zeros([size(ideH.siH,1),nparam,MAX_tau]);
             stoJJ = zeros([size(ideJ.siJ,1),nparam,MAX_tau]);
-- 
GitLab