From 33873da95d94ce1ea77a9f69e323da0a583638ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Fri, 21 Jun 2019 11:16:57 +0200 Subject: [PATCH] Fixed bug. Database was not updated with auxiliary variables. (cherry picked from commit a64be8ff96d66a40b0b3277d68c0918ad5dfe07c) --- matlab/backward/checkdatabase.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/matlab/backward/checkdatabase.m b/matlab/backward/checkdatabase.m index ac6d2f535..6c4dfa05a 100644 --- a/matlab/backward/checkdatabase.m +++ b/matlab/backward/checkdatabase.m @@ -23,14 +23,16 @@ function [dbase, info] = checkdatabase(dbase, DynareModel, inversionflag, simula % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . +% if DynareModel.maximum_endo_lead +% error('The model (%s) is assumed to be backward!', DynareModel.fname) +% end + if nargin<3 inversionflag = false; end -set_auxiliary_series = [DynareModel.fname '.dynamic_set_auxiliary_series']; - -if exist(['+' DynareModel.fname filesep() 'dynamic_set_auxiliary_series']) - dbase = feval(set_auxiliary_series, dbase, DynareModel.params); +if exist(sprintf('+%s/dynamic_set_auxiliary_series', DynareModel.fname), 'file') + dbase = feval(sprintf('%s.dynamic_set_auxiliary_series', DynareModel.fname), dbase, DynareModel.params); end listoflaggedexogenousvariables = {};