diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index 311f283bee5a6afc0d75de784f6fb390fe64fbf9..32160ad58ea1ae312bace2bcd7dae00505ae1916 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -12,7 +12,7 @@ function dynare_estimation_1(var_list_,dname) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2018 Dynare Team +% Copyright (C) 2003-2021 Dynare Team % % This file is part of Dynare. % @@ -32,6 +32,11 @@ function dynare_estimation_1(var_list_,dname) global M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info if ~exist([M_.dname filesep 'Output'],'dir') + if isoctave && ~exist(M_.dname) + % See https://savannah.gnu.org/bugs/index.php?61166 + % This workaround is needed for recursive estimation. + mkdir(M_.dname) + end mkdir(M_.dname,'Output'); end diff --git a/tests/estimation/example_nls.mod b/tests/estimation/example_nls.mod index 1dfd401b8136078953853f629c0ebfb8d8ce2504..4a77b09ef75913086c0b95863095836b4daf2761 100644 --- a/tests/estimation/example_nls.mod +++ b/tests/estimation/example_nls.mod @@ -58,4 +58,10 @@ eparams.beta = 1; simulations.ey = dseries(NaN); // Reset residuals of the equation to NaN. -estimate.nls('eq4y', eparams, simulations, dates('3Y'):simulations.dates(end)); +if ~isoctave + % Under Octave, estimate.nls (provided by matlab/+estimate/nls.m) is not + % accessible because there is a function which has the same name as the + % +estimate package, namely matlab/cli/estimate.m. This is a known Octave + % bug (https://savannah.gnu.org/bugs/?func=detailitem&item_id=46889). + estimate.nls('eq4y', eparams, simulations, dates('3Y'):simulations.dates(end)); +end