lyap

lyap(A,Q)

Try it yourself:

See also:
All functions