From 7f6f66c1c9ab040de762b171de486bc1b4f9300c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 6 Oct 2023 16:17:09 -0400
Subject: [PATCH] steady: add a warning if homotopy_setup block is present but
 homotopy_mode=0

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

diff --git a/matlab/steady.m b/matlab/steady.m
index 569409247f..9b3c4f238f 100644
--- a/matlab/steady.m
+++ b/matlab/steady.m
@@ -38,6 +38,10 @@ Sigma_e = M_.Sigma_e;
 % Set M_.Sigma_e=0 (we compute the *deterministic* steady state)
 M_.Sigma_e(:,:) = 0;
 
+if isfield(options_, 'homotopy_values') && options_.homotopy_mode == 0
+    warning('STEADY: a homotopy_setup block is present but homotopy will not be performed because homotopy_mode option is equal to 0')
+end
+
 if options_.homotopy_mode ~= 0
     if ~isfield(options_, 'homotopy_values')
         error('STEADY: a homotopy_setup block must be present when the homotopy_mode option is specified')
-- 
GitLab