From 121333d9133022fd7bf0f4949372a7aa0e07c10e Mon Sep 17 00:00:00 2001
From: Marco Ratto <marco.ratto@jrc.ec.europa.eu>
Date: Thu, 16 Feb 2017 14:48:40 +0100
Subject: [PATCH] currently, the mode_file specified by the user is re-set to
 empty. This re-sets mode_file to the user defined value.

---
 matlab/dynare_estimation.m | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m
index dff898fb4e..56221affe7 100644
--- a/matlab/dynare_estimation.m
+++ b/matlab/dynare_estimation.m
@@ -32,7 +32,7 @@ function oo_recursive_=dynare_estimation(var_list,dname)
 global options_ oo_ M_ dataset_ dataset_info
 
 oo_recursive_={};
-
+mode_file0 = options_.mode_file; % store mode_file set by the user
 % Test if the order of approximation is nonzero (the preprocessor tests if order is non negative).
 if isequal(options_.order,0)
     error('Estimation:: The order of the Taylor approximation cannot be 0!')
@@ -212,4 +212,5 @@ if nnobs > 1 && horizon > 0
         end
     end
 end
-options_.mode_file = ''; %delete stored mode-file so that it is not reaccessed in later calls (and in case it was only set by the recursive estimation)
+options_.mode_file = mode_file0; 
+%reset stored mode-file to user defined one (and in case it was only set by the recursive estimation)
-- 
GitLab