From 031632edd35c560934823f656ce5ed195517ed67 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Tue, 10 Sep 2019 09:23:49 +0200
Subject: [PATCH] stoch_simul.m: provide informative error message if no varexo
 have been defined

---
 matlab/stoch_simul.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m
index 4e7d6a41a8..e76d9577ea 100644
--- a/matlab/stoch_simul.m
+++ b/matlab/stoch_simul.m
@@ -24,6 +24,10 @@ if isequal(options_.order,0)
     error('stoch_simul:: The order of the Taylor approximation cannot be 0!')
 end
 
+if M_.exo_nbr==0
+    error('stoch_simul:: does not support having no varexo in the model. As a workaround you could define a dummy exogenous variable.')
+end
+
 test_for_deep_parameters_calibration(M_);
 
 dr = oo_.dr;
-- 
GitLab