From c18077781857fe04722e3c3a4c0ceaacc5c34d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 16 May 2018 16:37:58 +0200 Subject: [PATCH] Move check about Octave version to the same place as check for MATLAB --- matlab/dynare.m | 13 ++++++++++++- matlab/dynare_config.m | 9 --------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/matlab/dynare.m b/matlab/dynare.m index 05c3d9ac5..53c67a98e 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -70,9 +70,20 @@ dynareroot = dynare_config('', preprocessoroutput); warning_config() -if ~isoctave +if isoctave + if octave_ver_less_than(supported_octave_version) + skipline() + warning(['This version of Octave is not supported. Consider installing ' ... + 'version %s+ of Octave,\notherwise m files will be used instead ' ... + 'of precompiled mex files and some features, like solution\n' ... + 'of models approximated at third order, will not be available.'], supported_octave_version()) + skipline() + end +else if matlab_ver_less_than('7.5') + skipline() warning('This version of Dynare has only been tested on MATLAB 7.5 (R2007b) and above. Since your MATLAB version is older than that, Dynare may fail to run, or give unexpected results. Consider upgrading your MATLAB installation, or switch to Octave.'); + skipline() end end diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m index ae534c290..dd79d8248 100644 --- a/matlab/dynare_config.m +++ b/matlab/dynare_config.m @@ -94,15 +94,6 @@ if isoctave p{end+1} = '/missing/ordeig'; end -if isoctave && ~compare_versions(version(), supported_octave_version(),'>=') - skipline() - warning(['This version of Octave is not supported. Consider installing ' ... - 'version %s+ of Octave,\notherwise m files will be used instead ' ... - 'of precompiled mex files and some features, like solution\n' ... - 'of models approximated at third order, will not be available.'], supported_octave_version()) - skipline() -end - % corrcoef with two outputs is missing in Octave (ticket #796) if isoctave && ~user_has_octave_forge_package('nan') p{end+1} = '/missing/corrcoef';