diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc
index bd2adaede73651d9ce97533ed3885ea0ebc994ed..b34057b0ebd816fd02cde9d888f75a5db92d8db8 100644
--- a/preprocessor/DynamicModel.cc
+++ b/preprocessor/DynamicModel.cc
@@ -1525,14 +1525,14 @@ DynamicModel::writeDynamicMFile(const string &dynamic_basename) const
                     << "%   residual  [M_.endo_nbr by 1] double    vector of residuals of the dynamic model equations in order of " << endl
                     << "%                                          declaration of the equations" << endl
                     << "%   g1        [M_.endo_nbr by #dynamic variables] double    Jacobian matrix of the dynamic model equations;" << endl
-                    << "%                                                           columns: equations in order of declaration" << endl
-                    << "%                                                           rows: variables in order stored in M_.lead_lag_incidence" << endl
+                    << "%                                                           rows: equations in order of declaration" << endl
+                    << "%                                                           columns: variables in order stored in M_.lead_lag_incidence" << endl
                     << "%   g2        [M_.endo_nbr by (#dynamic variables)^2] double   Hessian matrix of the dynamic model equations;" << endl
-                    << "%                                                              columns: equations in order of declaration" << endl
-                    << "%                                                              rows: variables in order stored in M_.lead_lag_incidence" << endl
+                    << "%                                                              rows: equations in order of declaration" << endl
+                    << "%                                                              columns: variables in order stored in M_.lead_lag_incidence" << endl
                     << "%   g3        [M_.endo_nbr by (#dynamic variables)^3] double   Third order derivative matrix of the dynamic model equations;" << endl
-                    << "%                                                              columns: equations in order of declaration" << endl
-                    << "%                                                              rows: variables in order stored in M_.lead_lag_incidence" << endl
+                    << "%                                                              rows: equations in order of declaration" << endl
+                    << "%                                                              columns: variables in order stored in M_.lead_lag_incidence" << endl
                     << "%" << endl
                     << "%" << endl                    
                     << "% Warning : this file is generated automatically by Dynare" << endl
diff --git a/preprocessor/StaticModel.cc b/preprocessor/StaticModel.cc
index ab11ca9aaee928b8941fd1777507112064ee20c6..18be48f11eafb94a826a96acd7c7477f24a1f9c2 100644
--- a/preprocessor/StaticModel.cc
+++ b/preprocessor/StaticModel.cc
@@ -1161,11 +1161,11 @@ StaticModel::writeStaticMFile(const string &func_name) const
          << "%   residual  [M_.endo_nbr by 1] double    vector of residuals of the static model equations " << endl
          << "%                                          in order of declaration of the equations" << endl
          << "%   g1        [M_.endo_nbr by M_.endo_nbr] double    Jacobian matrix of the static model equations;" << endl
-         << "%                                                    columns: equations in order of declaration" << endl
-         << "%                                                    rows: variables in declaration order" << endl
+         << "%                                                       columns: variables in declaration order" << endl
+         << "%                                                       rows: equations in order of declaration" << endl
          << "%   g2        [M_.endo_nbr by (M_.endo_nbr)^2] double   Hessian matrix of the static model equations;" << endl
-         << "%                                                       columns: equations in order of declaration" << endl
-         << "%                                                       rows: variables in declaration order" << endl
+         << "%                                                       columns: variables in declaration order" << endl
+         << "%                                                       rows: equations in order of declaration" << endl
          << "%   g3        [M_.endo_nbr by (M_.endo_nbr)^3] double   Third derivatives matrix of the static model equations;" << endl
          << "%                                                       columns: variables in declaration order" << endl
          << "%                                                       rows: equations in order of declaration" << endl