Skip to content
Snippets Groups Projects
Verified Commit 820df39f authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Compatibility fix for MATLAB < R2019b

MATLAB < R2019b does not accept “bar(1, [2 3])”.
parent 9460da5b
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ function plot_identification(params, idemoments, idehess, idemodel, idelre, adva
% SPECIAL REQUIREMENTS
% None
% Copyright (C) 2008-2017 Dynare Team
% Copyright (C) 2008-2021 Dynare Team
%
% This file is part of Dynare.
%
......@@ -59,7 +59,8 @@ if SampleSize == 1
subplot(211)
mmm = (idehess.ide_strength_dMOMENTS);
[ss, is] = sort(mmm);
if ~all(isnan(idehess.ide_strength_dMOMENTS_prior))
if ~all(isnan(idehess.ide_strength_dMOMENTS_prior)) ...
&& ~(nparam == 1 && ~isoctave && matlab_ver_less_than('9.7')) % MATLAB < R2019b does not accept bar(1, [2 3])
bar(1:nparam,log([idehess.ide_strength_dMOMENTS(:,is)' idehess.ide_strength_dMOMENTS_prior(:,is)']))
else
bar(1:nparam,log([idehess.ide_strength_dMOMENTS(:,is)' ]))
......@@ -105,7 +106,8 @@ if SampleSize == 1
end
subplot(212)
if ~all(isnan(idehess.deltaM_prior))
if ~all(isnan(idehess.deltaM_prior)) ...
&& ~(nparam == 1 && ~isoctave && matlab_ver_less_than('9.7')) % MATLAB < R2019b does not accept bar(1, [2 3])
bar(1:nparam, log([idehess.deltaM(is) idehess.deltaM_prior(is)]))
else
bar(1:nparam, log([idehess.deltaM(is)]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment