diff --git a/m4/ax_matlab_version.m4 b/m4/ax_matlab_version.m4
index bce0d4c7b89554e88582c65b1d274e5419f30684..78a92687260eabbc08fd54b1853bf0565f42359e 100644
--- a/m4/ax_matlab_version.m4
+++ b/m4/ax_matlab_version.m4
@@ -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
+    *2011b | *2011B)
+      MATLAB_VERSION="7.13"
+      ;;
     *2011a | *2011A)
       MATLAB_VERSION="7.12"
       ;;
diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m
index a063e7493afce5313234a62741b7a3e2f9924472..10ef4618c72ab398584063202fb3e794d520ab5b 100644
--- a/matlab/dynare_config.m
+++ b/matlab/dynare_config.m
@@ -87,7 +87,7 @@ else
                 addpath(mexpath)
             end
         else
-            mexpath = [dynareroot '../mex/matlab/win32-7.5-7.12'];
+            mexpath = [dynareroot '../mex/matlab/win32-7.5-7.13'];
             if exist(mexpath, 'dir')
                 addpath(mexpath)
             end
@@ -112,7 +112,7 @@ else
                 addpath(mexpath)
             end
         else
-            mexpath = [dynareroot '../mex/matlab/win64-7.8-7.12'];
+            mexpath = [dynareroot '../mex/matlab/win64-7.8-7.13'];
             if exist(mexpath, 'dir')
                 addpath(mexpath)
             end
diff --git a/windows/dynare.nsi b/windows/dynare.nsi
index a7c09ca8022e504a4a29dba28ef9f0c86d71352a..ab72d192f17d2125e48b50ce6f12ed1234e37ef0 100644
--- a/windows/dynare.nsi
+++ b/windows/dynare.nsi
@@ -80,9 +80,9 @@ Section "MEX files for MATLAB 32-bit, version 7.0 to 7.4 (R14 to R2007a)"
  File ..\mex\matlab\win32-7.0-7.4\*.dll
 SectionEnd
 
-Section "MEX files for MATLAB 32-bit, version 7.5 to 7.12 (R2007b to R2011a)"
- SetOutPath $INSTDIR\mex\matlab\win32-7.5-7.12
- File ..\mex\matlab\win32-7.5-7.12\*.mexw32
+Section "MEX files for MATLAB 32-bit, version 7.5 to 7.13 (R2007b to R2011b)"
+ SetOutPath $INSTDIR\mex\matlab\win32-7.5-7.13
+ File ..\mex\matlab\win32-7.5-7.13\*.mexw32
 SectionEnd
 
 # Currently we don't have that version of MATLAB
@@ -101,9 +101,9 @@ Section "MEX files for MATLAB 64-bit, version 7.5 to 7.7 (R2007b to R2008b)"
  File ..\mex\matlab\win64-7.5-7.7\*.mexw64
 SectionEnd
 
-Section "MEX files for MATLAB 64-bit, version 7.8 to 7.12 (R2009a to R2011a)"
- SetOutPath $INSTDIR\mex\matlab\win64-7.8-7.12
- File ..\mex\matlab\win64-7.8-7.12\*.mexw64
+Section "MEX files for MATLAB 64-bit, version 7.8 to 7.13 (R2009a to R2011b)"
+ SetOutPath $INSTDIR\mex\matlab\win64-7.8-7.13
+ File ..\mex\matlab\win64-7.8-7.13\*.mexw64
 SectionEnd
 
 SectionGroupEnd