st_ility - stabilizability test
Slo=( U'*A*U, U'*B, C*U, D, U'*x0 ) (syslin list) displays the stabilizable form of Sl. Stabilizability means ns=nx (dim. of A matrix).
[*,*,*] [*] U'*A*U = [0,*,*] U'*B =  [0,0,*] 
where (A11,B1) (dim(A11)= nc) is controllable and A22 (dim(A22)=ns-nc) is stable. "Stable" means real part of eigenvalues negative for a continuous linear system, and magnitude of eigenvalues lower than one for a discrete-time system (as defined by syslin).
A=diag([0.9,-2,3]);B=[0;0;1];Sl=syslin('c',A,B,); [ns,nc,U]=st_ility(Sl); U'*A*U U'*B [ns,nc,U]=st_ility(syslin('d',A,B,)); U'*A*U U'*B