lyap | R Documentation |
Algebraic Lyapunov equation A*X+X*t(A)+Q=0
lyap(A, Q)
A |
A quadratic matrix without eigenvalues on the imaginary axis |
Q |
A symmetric matix of same dimension as A |
If A is asymptotically stable, Q is positive semidefinite and the pair (A,Q) is controllable, then X will be positive definite. Several similar results exist. The implementation uses vectorization and kronecker products and does not employ sparsity, so is only suitable for small systems.
X A symmetric matrix of same dimension as A
# A scalar example
(lyap(-1,1))
# A harmonic oscillator
(lyap(array(c(0,-1,1,-0.1),c(2,2)),diag(c(0,1))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.