diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc
index 1a5de8b9b0a63659207474cb8db6609bc9ae9c20..a1b8c31c80acd01da03a189a6e86e0a9fb323c8d 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 d82efaeda73153ad657225ee293940cd08cafa74..ba1f695df609780eeb531aea9c733bbdbe6c0285 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