steady: add a warning if homotopy_setup block is present but homotopy_mode=0

kalman-mex
Sébastien Villemot 2023-10-06 16:17:09 -04:00
parent 82ea15e5e7
commit 7f6f66c1c9
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 4 additions and 0 deletions

View File

@ -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')