Skip to content
Snippets Groups Projects
Commit 3dd1ffb8 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

pruned_state_space_system.m: gracefully exit in case of unit roots

parent 41ac891f
No related branches found
No related tags found
1 merge request!2163Add variance decomposition for pruned state space
...@@ -370,6 +370,9 @@ lyapunov_symm_method = 1; %method=1 to initialize persistent variables ...@@ -370,6 +370,9 @@ lyapunov_symm_method = 1; %method=1 to initialize persistent variables
%find stationary vars %find stationary vars
stationary_vars = (1:y_nbr)'; stationary_vars = (1:y_nbr)';
if ~isempty(Schur_u) if ~isempty(Schur_u)
if order>1
error('pruned_state_space_system: the pruned state space currently does not support unit roots at higher order.')
end
%base this only on first order, because if first-order is stable so are the higher-order pruned systems %base this only on first order, because if first-order is stable so are the higher-order pruned systems
x = abs(gx*Schur_u); x = abs(gx*Schur_u);
stationary_vars = find(all(x < options.schur_vec_tol,2)); stationary_vars = find(all(x < options.schur_vec_tol,2));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment