Octave 7 compatibility fix: suppress spurious warnings
In this version of Octave, “warning on” really enables all warnings (while this was not the case in Octave 6, suprisingly; I think this used to be different with even older Octave releases). We therefore need to explicitly disable the Octave:array-as-logical warnings, that is triggered by some internal Octave functions. We also need to be careful to call “warning_config” instead of “warning on” when restoring warnings to their default state.fix-tolerance-parameters
parent
a0e78957da
commit
ec5468c431
|
@ -63,7 +63,7 @@ function [oo_, options_mom_, M_] = run(bayestopt_, options_, oo_, estim_params_,
|
|||
% o set_all_parameters.m
|
||||
% o test_for_deep_parameters_calibration.m
|
||||
% =========================================================================
|
||||
% Copyright © 2020-2021 Dynare Team
|
||||
% Copyright © 2020-2022 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -1018,11 +1018,7 @@ fprintf('\n==== Method of Moments Estimation (%s) Completed ====\n\n',options_mo
|
|||
% Step 9: Clean up
|
||||
% -------------------------------------------------------------------------
|
||||
%reset warning state
|
||||
if isoctave
|
||||
warning('on')
|
||||
else
|
||||
warning on
|
||||
end
|
||||
warning_config;
|
||||
|
||||
if isoctave && isfield(options_, 'prior_restrictions') && ...
|
||||
isfield(options_.prior_restrictions, 'routine')
|
||||
|
|
|
@ -42,7 +42,7 @@ function [a, a1, P, P1, v, T, R, C, regimes_, error_flag, M_, lik, etahat] = kal
|
|||
% Philipp Pfeiffer, Marco Ratto (2021), Efficient and robust inference of models with occasionally binding
|
||||
% constraints, Working Papers 2021-03, Joint Research Centre, European Commission
|
||||
|
||||
% Copyright © 2021 Dynare Team
|
||||
% Copyright © 2021-2022 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -323,7 +323,7 @@ P(:,:,2) = T(:,:,2)*P(:,:,1)*transpose(T(:,:,2))+QQ;
|
|||
regimes_=regimes_(1:3);
|
||||
etahat=etahat(:,2);
|
||||
|
||||
warning on
|
||||
warning_config;
|
||||
end
|
||||
|
||||
function [a, a1, P, P1, v, alphahat, etahat, lik] = occbin_kalman_update0(a,a1,P,P1,data_index,Z,v,Y,H,QQQ,TT,RR,CC,iF,L,mm, rescale_prediction_error_covariance, IF_likelihood)
|
||||
|
@ -424,5 +424,5 @@ while t > 1
|
|||
end
|
||||
end
|
||||
|
||||
warning on
|
||||
warning_config;
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ function WriteShockDecomp2Excel(z,shock_names,endo_names,i_var,initial_date,Dyna
|
|||
% DynareModel [structure] Dynare model structure
|
||||
% DynareOptions [structure] Dynare options structure
|
||||
|
||||
% Copyright © 2016-2021 Dynare Team
|
||||
% Copyright © 2016-2022 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -124,7 +124,7 @@ for j=1:nvar
|
|||
else
|
||||
writetable(cell2table(d0), [OutputDirectoryName,filesep,DynareModel.fname,'_shock_decomposition',fig_mode,fig_name1 '.xls'], 'Sheet', endo_names{i_var(j)},'WriteVariableNames',false);
|
||||
end
|
||||
warning on
|
||||
warning_config;
|
||||
|
||||
clear d0
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ function [pdraws, STO_REDUCEDFORM, STO_MOMENTS, STO_DYNAMIC, STO_si_dDYNAMIC, ST
|
|||
% * skipline
|
||||
% * vnorm
|
||||
% =========================================================================
|
||||
% Copyright © 2010-2021 Dynare Team
|
||||
% Copyright © 2010-2022 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -968,11 +968,7 @@ if SampleSize > 1
|
|||
end
|
||||
|
||||
%reset warning state
|
||||
if isoctave
|
||||
warning('on')
|
||||
else
|
||||
warning on
|
||||
end
|
||||
warning_config;
|
||||
|
||||
fprintf('\n==== Identification analysis completed ====\n\n')
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 4fb36e8bccd623ed892778dba8a765b1a79a569a
|
||||
Subproject commit 43d4bafa36380e99f6ae4b3d3a3160fb9f1699c0
|
|
@ -41,6 +41,7 @@ if isoctave
|
|||
warning('off', 'Octave:num-to-str');
|
||||
warning('off', 'Octave:resize-on-range-error');
|
||||
warning('off', 'Octave:str-to-num');
|
||||
warning('off', 'Octave:array-as-logical');
|
||||
warning('off', 'Octave:array-to-scalar');
|
||||
warning('off', 'Octave:array-to-vector');
|
||||
warning('off', 'Octave:mixed-string-concat');
|
||||
|
|
Loading…
Reference in New Issue