From c4ac853ba496988beeb7986f5036d657c5bc712e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Scylla=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Tue, 25 Feb 2014 15:41:34 +0100
Subject: [PATCH] Bug fix.

<M_.fname>_optimal_mh_scale_parameter.mat was not deleted if mode_compute>0.

(cherry picked from commit 3c7ef8e57a37bfc6a11fcf2daac18fffbd2b65da)
---
 matlab/dynare_estimation_1.m | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m
index 21b056d86..9bf5c2532 100644
--- a/matlab/dynare_estimation_1.m
+++ b/matlab/dynare_estimation_1.m
@@ -137,8 +137,7 @@ ub = bayestopt_.ub;
 
 dr = oo_.dr;
 
-%% load optimal_mh_scale parameter if previous run was with
-%% mode_compute=6
+% load optimal_mh_scale parameter if previous run was with mode_compute=6
 mh_scale_fname = [M_.fname '_optimal_mh_scale_parameter.mat'];
 if exist(mh_scale_fname)
     if options_.mode_compute == 0
@@ -147,7 +146,7 @@ if exist(mh_scale_fname)
         clear tmp;
     else
         % remove the file if mode_compute ~= 0
-        delete('mh_scale_fname')
+        delete(mh_scale_fname)
     end
 end
 
-- 
GitLab