FUNCTION REFERENCE

lyap

Solve continuous Lyapunov and Sylvester equations.

Solve continuous Lyapunov and Sylvester equations.

Syntax

X = lyap(A,Q)

Syntax

X = lyap(A,B,C)

lyap(A,Q) solves A*X + X*A' + Q = 0; lyap(A,B,C) solves the Sylvester equation A*X + X*B + C = 0 with C of size rows(A) by rows(B). Bartels-Stewart method: real Schur forms of A and B (made triangular with rsf2csf) and complex back-substitution; O(m^3+n^3) work, no Kronecker matrix or inverse. A unique solution exists only when lambda_i(A) + lambda_j(B) is nonzero for every eigenvalue pair; otherwise the error names that condition (a pair counts as zero below 100*eps*(norm(A,'fro')+norm(B,'fro'))).

Example

A=[-1 2;0 -3]; Q=eye(2); X=lyap(A,Q); norm(A*X+X*A'+Q)

Example

X=lyap([-1 0;1 -2],-4,[1;2])

Differences from MATLAB: finite real double matrices with at most 512 rows. The generalized form lyap(A,Q,[],E) is not supported yet. Q is not required to be symmetric and X is not symmetrized.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.