diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m
index 9aeffe7f1035b08d58398a03d4fdc3893843972b..8d214fa4961420472af7c725d3f8f8a855537d3b 100644
--- a/matlab/dynare_config.m
+++ b/matlab/dynare_config.m
@@ -83,8 +83,8 @@ if ~isoctave
     p{end+1} = '/missing/vec';
 end
 
-% ordeig() doesn't exist in Octave
-if isoctave
+% ordeig() doesn't exist in Octave < 5
+if isoctave && octave_ver_less_than('5')
     p{end+1} = '/missing/ordeig';
 end
 
@@ -117,8 +117,8 @@ if ~exist('struct2array')
     p{end+1} = '/missing/struct2array';
 end
 
-% isfile is missing in Octave and Matlab<R2017b
-if isoctave || matlab_ver_less_than('9.3')
+% isfile is missing in Octave < 5 and Matlab < R2017b
+if (isoctave && octave_ver_less_than('5')) || (~isoctave && matlab_ver_less_than('9.3'))
     p{end+1} = '/missing/isfile';
 end
 
diff --git a/matlab/warning_config.m b/matlab/warning_config.m
index b1fbae1775d0495b1d475b7053d972bd8daa223b..82a7ca5156f06fc687d50d99f1e5b70d1f8104c1 100644
--- a/matlab/warning_config.m
+++ b/matlab/warning_config.m
@@ -47,6 +47,7 @@ if isoctave
     warning('off', 'Octave:variable-switch-label');
     warning('off', 'Octave:fortran-indexing');
     warning('off', 'Octave:classdef-to-struct');
+    warning('off', 'Octave:legacy-function'); % For strmatch and isdir
 else
     % In MATLAB >= 7.7, don't display a warning if we use deprecated
     % interface to set seed of random number generators