From a39a0b3b67b126a55a7d853dea9533fa70d13f05 Mon Sep 17 00:00:00 2001
From: Michel Juillard <michel.juillard@mjui.fr>
Date: Wed, 13 Jun 2012 14:01:03 +0200
Subject: [PATCH] fixed bug when only variances are estimated, but no deep
 parameter

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

diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m
index 4e7d8c1d0..fc220af0d 100644
--- a/matlab/dynare_estimation_init.m
+++ b/matlab/dynare_estimation_init.m
@@ -335,7 +335,7 @@ nvx = estim_params_.nvx;
 ncx = estim_params_.ncx;
 nvn = estim_params_.nvn;
 ncn = estim_params_.ncn;
-if isfield(estim_params_,'param_vals')
+if ~isempty(estim_params_.param_vals)
   M.params(estim_params_.param_vals(:,1)) = xparam1(nvx+ncx+nvn+ncn+1:end);
 end;
 oo_.steady_state = evaluate_steady_state(oo_.steady_state,M,options_,oo_,steadystate_check_flag);
-- 
GitLab