diff --git a/m4/ax_matlab_version.m4 b/m4/ax_matlab_version.m4
index 67cc47cb5686cbba12d72dfed9ac23e27d0131bb..113aa728869578eef1cd8fddaecfe33ea33952c4 100644
--- a/m4/ax_matlab_version.m4
+++ b/m4/ax_matlab_version.m4
@@ -1,4 +1,4 @@
-dnl Copyright © 2009-2020 Dynare Team
+dnl Copyright © 2009-2021 Dynare Team
 dnl
 dnl This file is part of Dynare.
 dnl
@@ -44,6 +44,9 @@ fi
 if test -n "$MATLAB_VERSION"; then
   dnl Convert a release number (Rnnnnx) into a version number (x.y)
   case $MATLAB_VERSION in
+    *2021a | *2021A)
+      MATLAB_VERSION="9.10"
+      ;;
     *2020b | *2020B)
       MATLAB_VERSION="9.9"
       ;;
diff --git a/macOS/build.sh b/macOS/build.sh
index 984588054c18053ae372cd81c4da53918b9b872d..752a180c70474671e4dc03186b69a6a81d80a038 100755
--- a/macOS/build.sh
+++ b/macOS/build.sh
@@ -94,7 +94,7 @@ PKGFILES="$ROOTDIR"/macOS/pkg/"$NAME"
 mkdir -p \
       "$PKGFILES"/preprocessor \
       "$PKGFILES"/mex/matlab/maci64-8.3-9.3 \
-      "$PKGFILES"/mex/matlab/maci64-9.4-9.9 \
+      "$PKGFILES"/mex/matlab/maci64-9.4-9.10 \
       "$PKGFILES"/doc/dynare++ \
       "$PKGFILES"/dynare++ \
       "$PKGFILES"/scripts \
@@ -158,7 +158,7 @@ make clean
   --with-slicot="$LIB64"/Slicot/with-underscore \
   --with-matlab=/Applications/MATLAB_R2019b.app
 make -j"$NTHREADS"
-cp -L  "$ROOTDIR"/mex/matlab/*                                       "$PKGFILES"/mex/matlab/maci64-9.4-9.9
+cp -L  "$ROOTDIR"/mex/matlab/*                                       "$PKGFILES"/mex/matlab/maci64-9.4-9.10
 
 
 ##
diff --git a/matlab/add_path_to_mex_files.m b/matlab/add_path_to_mex_files.m
index bf45ffac65a804df27b5ca887fcad830ba2ce425..757864c7a5ee098217253634cf305e0182e99a28 100644
--- a/matlab/add_path_to_mex_files.m
+++ b/matlab/add_path_to_mex_files.m
@@ -1,6 +1,6 @@
 function mexpath = add_path_to_mex_files(dynareroot, modifypath)
 
-% Copyright (C) 2015-2020 Dynare Team
+% Copyright (C) 2015-2021 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -60,7 +60,7 @@ else
                 end
             end
         else
-            tmp = [dynareroot '../mex/matlab/win64-9.4-9.9/'];
+            tmp = [dynareroot '../mex/matlab/win64-9.4-9.10/'];
             if exist(tmp, 'dir')
                 mexpath = tmp;
                 if modifypath
@@ -80,7 +80,7 @@ else
                 end
             end
         else
-            tmp = [dynareroot '../mex/matlab/maci64-9.4-9.9'];
+            tmp = [dynareroot '../mex/matlab/maci64-9.4-9.10'];
             if exist(tmp, 'dir')
                 mexpath = tmp;
                 if modifypath
diff --git a/windows/build.sh b/windows/build.sh
index 4d4c7c8f12fb19ba964bf9e350b892939ddbb6af..d930f9624ae90eacfd327dddb23121724083a8db 100755
--- a/windows/build.sh
+++ b/windows/build.sh
@@ -5,7 +5,7 @@
 # The binaries are cross compiled for Windows (64-bit), Octave and MATLAB
 # (all supported versions).
 
-# Copyright © 2017-2020 Dynare Team
+# Copyright © 2017-2021 Dynare Team
 #
 # This file is part of Dynare.
 #
@@ -121,8 +121,8 @@ build_windows_matlab_mex_64_b ()
 		     PACKAGE_STRING="dynare $VERSION"
     make -j"$NTHREADS" all
     x86_64-w64-mingw32-strip -- **/*.mexw64
-    mkdir -p "$ROOT_DIRECTORY"/../mex/matlab/win64-9.4-9.9
-    mv -- **/*.mexw64 "$ROOT_DIRECTORY"/../mex/matlab/win64-9.4-9.9
+    mkdir -p "$ROOT_DIRECTORY"/../mex/matlab/win64-9.4-9.10
+    mv -- **/*.mexw64 "$ROOT_DIRECTORY"/../mex/matlab/win64-9.4-9.10
 }
 
 # Create Windows DLL binaries for Octave/MinGW (64bit)
diff --git a/windows/dynare.nsi b/windows/dynare.nsi
index 386ee8ab01473c1b1a82b8b447455b32b9bcf7fc..f4a09ba62639695b98721d3efcffe23dd646c60f 100644
--- a/windows/dynare.nsi
+++ b/windows/dynare.nsi
@@ -90,9 +90,9 @@ Section "MEX files for MATLAB 64-bit, version 8.3 to 9.3 (R2014a to R2017b)"
  File ..\mex\matlab\win64-8.3-9.3\*.mexw64
 SectionEnd
 
-Section "MEX files for MATLAB 64-bit, version 9.4 to 9.9 (R2018a to R2020b)"
- SetOutPath $INSTDIR\mex\matlab\win64-9.4-9.9
- File ..\mex\matlab\win64-9.4-9.9\*.mexw64
+Section "MEX files for MATLAB 64-bit, version 9.4 to 9.10 (R2018a to R2021a)"
+ SetOutPath $INSTDIR\mex\matlab\win64-9.4-9.10
+ File ..\mex\matlab\win64-9.4-9.10\*.mexw64
 SectionEnd
 
 Section "MinGW compiler for MATLAB 64-bit"