From 42b82087d5693f98aa844bf33f641db24acae8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 16 May 2018 14:13:22 +0200 Subject: [PATCH] Remove codepaths for unsupported Octave versions --- matlab/dynare.m | 6 +----- matlab/gensylv/sylvester3.m | 6 +----- matlab/plot_icforecast.m | 5 ----- matlab/warning_config.m | 6 +----- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/matlab/dynare.m b/matlab/dynare.m index 616db198a..05c3d9ac5 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -81,11 +81,7 @@ more off % sets default format for save() command if isoctave - if octave_ver_less_than('3.8') - default_save_options('-mat') - else - save_default_options('-mat') - end + save_default_options('-mat') end if nargin < 1 diff --git a/matlab/gensylv/sylvester3.m b/matlab/gensylv/sylvester3.m index 4e0ab85ee..29812c694 100644 --- a/matlab/gensylv/sylvester3.m +++ b/matlab/gensylv/sylvester3.m @@ -38,11 +38,7 @@ end if isoctave [aa,bb,qq,zz]=qz(full(a),full(b)); for j=1:p - if octave_ver_less_than('3.4.0') - d(:,:,j)=qq'*d(:,:,j)*u; - else - d(:,:,j)=qq*d(:,:,j)*u; - end + d(:,:,j)=qq*d(:,:,j)*u; end else [aa,bb,qq,zz]=qz(full(a),full(b),'real'); % available in Matlab version 6.0 diff --git a/matlab/plot_icforecast.m b/matlab/plot_icforecast.m index f6eb63e3e..862a101cd 100644 --- a/matlab/plot_icforecast.m +++ b/matlab/plot_icforecast.m @@ -27,11 +27,6 @@ function plot_icforecast(Variables,periods,options_) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . -if isoctave && octave_ver_less_than('3.4.0') - % The set() command on the handle returned by area() crashes in Octave 3.2 - error('plot_conditional_forecast: you need Octave >= 3.4 (because of a bug in older versions)') -end - load conditional_forecasts; forecast_periods = length(forecasts.cond.Mean.(Variables{1})); diff --git a/matlab/warning_config.m b/matlab/warning_config.m index a7cbaab92..c1abf3d85 100644 --- a/matlab/warning_config.m +++ b/matlab/warning_config.m @@ -34,11 +34,7 @@ warning('on', 'backtrace'); if isoctave warning('off', 'Octave:separator-insert'); - if octave_ver_less_than('4.0') - warning('off', 'Octave:matlab-incompatible'); - else - warning('off', 'Octave:language-extension'); - end + warning('off', 'Octave:language-extension'); warning('off', 'Octave:single-quote-string'); warning('off', 'Octave:missing-semicolon'); warning('off', 'Octave:empty-list-elements');