gcare - control Riccati equation
Generalized Control Algebraic Riccati Equation (GCARE). X = solution , F = gain.
The GCARE for Sl=[A,B,C,D] is:
where S=(eye()+D'*D), Si=inv(S), R=(eye()+D*D'), Ri=inv(R) and F=-Si*(D'*C+B'*X) is such that A+B*F is stable.