diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 83dc021cdc6b92e1b739cc7dc83773dc76318afc..3430de6711c843d7f7c75a237863569408b9f551 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,12 +10,12 @@ before_script:
 test_matlab:
   stage: test
   script:
-    - make check-matlab MATLAB=/usr/local/MATLAB/$MATLAB_VERSION/bin/matlab
+    - make check-matlab MATLAB=/opt/MATLAB/$MATLAB_VERSION/bin/matlab
 
 test_old_matlab:
   stage: test
   script:
-    - make check-matlab MATLAB=/usr/local/MATLAB/$OLD_MATLAB_VERSION/bin/matlab
+    - make check-matlab MATLAB=/opt/MATLAB/$OLD_MATLAB_VERSION/bin/matlab
 
 test_octave:
   stage: test