<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>lyap</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="lyap"> Lyapunov equation</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[X]=lyap(A,C,'c')  </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>[X]=lyap(A,C,'d')  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>A, C</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real square matrices, <VERB>C</VERB> must be symmetric</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>X = lyap(A,C,flag)</VERB> solves the continuous time or
    discrete time matrix Lyapunov matrix equation:</P>
    <VERBATIM>
<![CDATA[
       A'*X + X*A = C       ( flag='c' )
      A'*X*A - X = C       ( flag='d' )
   ]]>
    </VERBATIM>
    <P>
Note that a unique solution exist if and only if an eigenvalue of <VERB>A</VERB> is
not an eigenvalue of <VERB>-A</VERB> (<VERB>flag='c'</VERB>)  or 1 over an eigenvalue of <VERB>A</VERB> 
(<VERB>flag='d'</VERB>).</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
A=rand(4,4);C=rand(A);C=C+C';
X=lyap(A,C,'c');
A'*X + X*A -C
X=lyap(A,C,'d');
A'*X*A - X -C
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>sylv</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>ctr_gram</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>obs_gram</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
