From 6b44e08daac6352b3b4a3af57addf29bff79968b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Fri, 6 Oct 2023 16:41:54 -0400 Subject: [PATCH] steady: add check over the value of homotopy_mode option --- matlab/steady.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/matlab/steady.m b/matlab/steady.m index 9b3c4f238f..9866224b32 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 ~ismember(options_.homotopy_mode, [0 1 2 3]) + error('STEADY: invalid value for homotopy_mode option') +end + 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 -- GitLab