diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5d06d427cc82d6571bbb8a7ae6625b81ef5ae207..04fab29cb5bcccedf4508ee8b954b34ce24c8754 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,15 +1,15 @@
 variables:
   GIT_SUBMODULE_STRATEGY: normal
   TERM: linux
+  MATLAB_VERSION: R2023a
+  OLD_MATLAB_VERSION: R2015a
 
 test_matlab:
   stage: test
   script:
-    - make check-matlab
+    - make check-matlab MATLAB=/opt/MATLAB/$MATLAB_VERSION/bin/matlab
 
 test_old_matlab:
   stage: test
-  variables:
-    MATLAB: /usr/local/MATLAB/R2015a/bin/matlab
   script:
-    - make check-matlab
\ No newline at end of file
+    - make check-matlab MATLAB=/opt/MATLAB/$OLD_MATLAB_VERSION/bin/matlab