lyap — Lyapunov equation
[X]=lyap(A,C,'c') [X]=lyap(A,C,'d')
X = lyap(A,C,flag)
solves the continuous time or
discrete time matrix Lyapunov matrix equation:
A'*X + X*A = C ( flag='c' ) A'*X*A - X = C ( flag='d' )
Note that a unique solution exist if and only if an eigenvalue of A
is
not an eigenvalue of -A
(flag='c'
) or 1 over an eigenvalue of A
(flag='d'
).