From 57326339e9efde4df3d0829e2a45afe4367a033d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Tue, 19 Jan 2021 16:22:28 +0100 Subject: [PATCH] SUR Gibbs: do not try to create plot under Octave and MATLAB < R2014b The histogram() function does not exist there. --- matlab/surgibbs.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matlab/surgibbs.m b/matlab/surgibbs.m index f9b1eecc9..6edc22331 100644 --- a/matlab/surgibbs.m +++ b/matlab/surgibbs.m @@ -27,7 +27,7 @@ function ds = surgibbs(ds, param_names, beta0, A, ndraws, discarddraws, thin, eq % Combination of Direct Monte Carlo and Importance Sampling Techniques. % Bayesian Analysis Volume 5, Number 1, pp. 65-96. -% Copyright (C) 2017-2020 Dynare Team +% Copyright (C) 2017-2021 Dynare Team % % This file is part of Dynare. % @@ -217,7 +217,8 @@ end % Plot % -if ~options_.nograph +% The histogram() function is not implemented in Octave and in MATLAB < R2014b +if ~options_.nograph && ~isoctave && ~matlab_ver_less_than('8.4') figure nrows = 5; ncols = floor(nparams/nrows);