From a00eb5e1ded61d2e0086f841203a5eec96e77931 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Sun, 8 Oct 2023 22:13:45 +0200
Subject: [PATCH] stoch_simul.m: add nomodelsummary option

---
 doc/manual/source/the-model-file.rst |  5 +++
 matlab/default_option_values.m       |  1 +
 matlab/stoch_simul.m                 | 50 +++++++++++++++-------------
 preprocessor                         |  2 +-
 4 files changed, 33 insertions(+), 25 deletions(-)

diff --git a/doc/manual/source/the-model-file.rst b/doc/manual/source/the-model-file.rst
index ab9e39519e..c9d630722f 100644
--- a/doc/manual/source/the-model-file.rst
+++ b/doc/manual/source/the-model-file.rst
@@ -4498,6 +4498,11 @@ Computing the stochastic solution
        Don’t print moments of the endogenous variables (printing them
        is the default).
 
+    .. option:: nomodelsummary
+
+       Don’t print the model summary and the covariance of the exogenous shocks (printing them
+       is the default).
+
     .. option:: nograph
 
        Do not create graphs (which implies that they are not saved to
diff --git a/matlab/default_option_values.m b/matlab/default_option_values.m
index fe2e7b8710..cf0ccfa015 100644
--- a/matlab/default_option_values.m
+++ b/matlab/default_option_values.m
@@ -164,6 +164,7 @@ options_.one_sided_hp_filter = 0;
 options_.filtered_theoretical_moments_grid = 512;
 options_.nodecomposition = false;
 options_.nomoments = false;
+options_.nomodelsummary = false;
 options_.nocorr = false;
 options_.periods = 0;
 options_.noprint = false;
diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m
index caf4aba070..6803b90404 100644
--- a/matlab/stoch_simul.m
+++ b/matlab/stoch_simul.m
@@ -134,36 +134,38 @@ if info(1)
 end
 
 if ~options_.noprint
-    skipline()
-    disp('MODEL SUMMARY')
-    skipline()
-    disp(['  Number of variables:         ' int2str(M_.endo_nbr)])
-    disp(['  Number of stochastic shocks: ' int2str(M_.exo_nbr)])
-    disp(['  Number of state variables:   ' int2str(M_.nspred)])
-    disp(['  Number of jumpers:           ' int2str(M_.nsfwrd)])
-    disp(['  Number of static variables:  ' int2str(M_.nstatic)])
-    my_title='MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS';
-    labels = M_.exo_names;
-    headers = vertcat('Variables', labels);
-    lh = cellofchararraymaxlength(labels)+2;
-    dyntable(options_, my_title, headers, labels, M_.Sigma_e, lh, 10, 6);
-    if options_.TeX
-        labels = M_.exo_names_tex;
-        headers = vertcat('Variables', labels);
-        lh = cellofchararraymaxlength(labels)+2;
-        dyn_latex_table(M_, options_, my_title, 'covar_ex_shocks', headers, labels, M_.Sigma_e, lh, 10, 6);
-    end
-    if ~all(diag(M_.H)==0)
-        my_title='MATRIX OF COVARIANCE OF MEASUREMENT ERRORS';
-        labels = cellfun(@(x) horzcat('SE_', x), options_.varobs, 'UniformOutput', false);
+    if ~options_.nomodelsummary
+        skipline()
+        disp('MODEL SUMMARY')
+        skipline()
+        disp(['  Number of variables:         ' int2str(M_.endo_nbr)])
+        disp(['  Number of stochastic shocks: ' int2str(M_.exo_nbr)])
+        disp(['  Number of state variables:   ' int2str(M_.nspred)])
+        disp(['  Number of jumpers:           ' int2str(M_.nsfwrd)])
+        disp(['  Number of static variables:  ' int2str(M_.nstatic)])
+        my_title='MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS';
+        labels = M_.exo_names;
         headers = vertcat('Variables', labels);
         lh = cellofchararraymaxlength(labels)+2;
-        dyntable(options_, my_title, headers, labels, M_.H, lh, 10, 6);
+        dyntable(options_, my_title, headers, labels, M_.Sigma_e, lh, 10, 6);
         if options_.TeX
             labels = M_.exo_names_tex;
             headers = vertcat('Variables', labels);
             lh = cellofchararraymaxlength(labels)+2;
-            dyn_latex_table(M_, options_, my_title, 'covar_ME', headers, labels, M_.H, lh, 10, 6);
+            dyn_latex_table(M_, options_, my_title, 'covar_ex_shocks', headers, labels, M_.Sigma_e, lh, 10, 6);
+        end
+        if ~all(diag(M_.H)==0)
+            my_title='MATRIX OF COVARIANCE OF MEASUREMENT ERRORS';
+            labels = cellfun(@(x) horzcat('SE_', x), options_.varobs, 'UniformOutput', false);
+            headers = vertcat('Variables', labels);
+            lh = cellofchararraymaxlength(labels)+2;
+            dyntable(options_, my_title, headers, labels, M_.H, lh, 10, 6);
+            if options_.TeX
+                labels = M_.exo_names_tex;
+                headers = vertcat('Variables', labels);
+                lh = cellofchararraymaxlength(labels)+2;
+                dyn_latex_table(M_, options_, my_title, 'covar_ME', headers, labels, M_.H, lh, 10, 6);
+            end
         end
     end
     if options_.partial_information
diff --git a/preprocessor b/preprocessor
index 16b063f666..3c20b9862b 160000
--- a/preprocessor
+++ b/preprocessor
@@ -1 +1 @@
-Subproject commit 16b063f666df679173e3da7f30ec1bff55755ddb
+Subproject commit 3c20b9862b87e894b00c70b10e7f5a425ba0372a
-- 
GitLab