diff --git a/matlab/+estimate/nls.m b/matlab/+estimate/nls.m index 2b9ee857c..a7f22e7e6 100644 --- a/matlab/+estimate/nls.m +++ b/matlab/+estimate/nls.m @@ -28,7 +28,7 @@ function nls(eqname, params, data, range, optimizer, varargin) % equation must have NaN values in the object. % [4] It is assumed that the residual is additive. -% Copyright © 2021 Dynare Team +% Copyright © 2021-2022 Dynare Team % % This file is part of Dynare. % @@ -182,8 +182,7 @@ write_ssr_routine(lhs, rhs, eqname, ipnames_, M_); % Workaround for Octave bug https://savannah.gnu.org/bugs/?46282 % Octave will randomly fail to read the ssr_* file generated in the +folder if isoctave - rename(['+' M_.fname], ['+' M_.fname '-tmp']); - rename(['+' M_.fname '-tmp'], ['+' M_.fname]); + path(path) end % Create a function handle returning the sum of square residuals for a given vector of parameters. diff --git a/matlab/+pac/+estimate/nls.m b/matlab/+pac/+estimate/nls.m index 131aab9af..8b5a13640 100644 --- a/matlab/+pac/+estimate/nls.m +++ b/matlab/+pac/+estimate/nls.m @@ -42,7 +42,7 @@ function nls(eqname, params, data, range, optimizer, varargin) % is available only if the matylab optimization toolbox is installed), the % remaining inputs are the options (key/value) passed to the optimizers. -% Copyright © 2018-2021 Dynare Team +% Copyright © 2018-2022 Dynare Team % % This file is part of Dynare. % @@ -99,8 +99,7 @@ write_ssr_routine(lhs, rhs, eqname, ipnames_, M_, pacmodl); % Workaround for Octave bug https://savannah.gnu.org/bugs/?46282 % Octave will randomly fail to read the ssr_* file generated in the +folder if isoctave - rename(['+' M_.fname], ['+' M_.fname '-tmp']); - rename(['+' M_.fname '-tmp'], ['+' M_.fname]); + path(path) end % Copy (sub)sample data in a matrix. @@ -272,4 +271,4 @@ if ~noprint dyn_table(title, preamble, afterward, oo_.pac.(pacmodl).parnames, ... {'Estimates','t-statistic','Std. Error'}, 4, ... [oo_.pac.(pacmodl).estimator oo_.pac.(pacmodl).student sqrt(diag(C))]); -end \ No newline at end of file +end