diff --git a/m4/ax_matlab_version.m4 b/m4/ax_matlab_version.m4
index e36a9c949fa8337c02d55e9f173072ce9cf67e94..5592f53106d05ca60b1d9eea2c84f709ef9df459 100644
--- a/m4/ax_matlab_version.m4
+++ b/m4/ax_matlab_version.m4
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2009-2016 Dynare Team
+dnl Copyright (C) 2009-2019 Dynare Team
 dnl
 dnl This file is part of Dynare.
 dnl
@@ -22,6 +22,9 @@ AC_REQUIRE([AX_MATLAB])
 AC_MSG_CHECKING([for MATLAB version])
 if test "x$MATLAB_VERSION" != "x"; then
   case $MATLAB_VERSION in
+    *2019b | *2019B)
+      MATLAB_VERSION="9.7"
+      ;;
     *2019a | *2019A)
       MATLAB_VERSION="9.6"
       ;;
diff --git a/windows/dynare.nsi b/windows/dynare.nsi
index f7960048613c851eb7f0dcff2516db3969265c52..d66fa99f5755d3eccb2a8a38b1f9d953d56d07ea 100644
--- a/windows/dynare.nsi
+++ b/windows/dynare.nsi
@@ -103,9 +103,9 @@ Section "MEX files for MATLAB 64-bit, version 7.8 to 9.3 (R2009a to R2017b)"
  File ..\mex\matlab\win64-7.8-9.3\*.mexw64
 SectionEnd
 
-Section "MEX files for MATLAB 64-bit, version 9.4 to 9.5 (R2018a to R2019a)"
- SetOutPath $INSTDIR\mex\matlab\win64-9.4-9.6
- File ..\mex\matlab\win64-9.4-9.6\*.mexw64
+Section "MEX files for MATLAB 64-bit, version 9.4 to 9.7 (R2018a to R2019b)"
+ SetOutPath $INSTDIR\mex\matlab\win64-9.4-9.7
+ File ..\mex\matlab\win64-9.4-9.7\*.mexw64
 SectionEnd
 
 SectionGroupEnd