PAC iterative OLS: compatibility fix for Octave < 6
parent
f094dc71f9
commit
901d8355e3
|
@ -22,7 +22,7 @@ function iterative_ols(eqname, params, data, range)
|
|||
% equation must have NaN values in the object.
|
||||
% [4] It is assumed that the residual is additive.
|
||||
|
||||
% Copyright (C) 2018-2019 Dynare Team
|
||||
% Copyright (C) 2018-2021 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -303,6 +303,10 @@ end
|
|||
|
||||
% Get indices in params0 for other parameters (optimizing agents share plus parameters related to exogenous variables).
|
||||
[~, params_id_2] = setdiff(1:length(ipnames_), params_id_1);
|
||||
if isoctave && octave_ver_less_than('6')
|
||||
% Under Octave < 6, setdiff() behaves as with the 'legacy' option (i.e. pre-R2012b behaviour)
|
||||
params_id_2 = params_id_2';
|
||||
end
|
||||
|
||||
% Get indices in params0 for the parameters associated to the exogenous variables.
|
||||
params_id_3 = setdiff(params_id_2, params_id_0);
|
||||
|
|
Loading…
Reference in New Issue