title: Command lyapchol in Matlab does not work
body: <p>The command lyapchol in Matlab needs A to have negative eigenvalues so that to compute grammian Wc successfully.</p>
  
  <p>I am trying lyapchol(A, B) , where eigenvalues of A are:</p>
  
  <pre><code>-7.702072757196139e+22
  
  -4.204548769720415e+17
  
  -4.132730155685816e+17
  
  -1.469863557258663e+17
  
  -1.341487748044014e+17
  
  -1.245824642151246e+17
  </code></pre>
  
  <p>while the eigenvalues of B are:</p>
  
  <pre><code> 3.266756797951905e+30
  
   5.904640027563640e+29
  
   1.072475598423812e+28
  
   3.756253951769876e+27
  
   2.511451875694431e+14
  
   1.031563230676382e+14
  </code></pre>
  
  <p>As you can see, all the eigenvalues of A are contained in the left half plane, but Matlab gives me error: 
  Error using lyapchol (line 58)
  In the "lyapchol(A,B,..)" command, A or (A,E) must have all their eigenvalues in the
  left-half plane.
  Error in TBR (line 49)
  Lc = lyapchol(A_new,B_new) </p>
  
  <p>Error using lyapchol (line 58)
  In the "lyapchol(A,B,..)" command, A or (A,E) must have all
  their eigenvalues in the left-half plane.
  Error in TBR (line 55)
  Lc = lyapchol(A,B_new) </p>
  
  <blockquote>
    <blockquote>
      <p>help lyapchol
       lyapchol  Square-root solver for continuous-time Lyapunov equations.</p>
    </blockquote>
  </blockquote>
  
  <pre><code>R = lyapchol(A,B) computes a Cholesky factorization X = R'*R of 
  the solution X to the Lyapunov matrix equation:
  
      A*X + X*A' + B*B' = 0
  
  All eigenvalues of A must lie in the open left half-plane for R 
  to exist.
  
  R = lyapchol(A,B,E) computes a Cholesky factorization X = R'*R of
  X solving the generalized Lyapunov equation:
  
      A*X*E' + E*X*A' + B*B' = 0
  
  All generalized eigenvalues of (A,E) must lie in the open left
  half-plane for R to exist.
  </code></pre>
  
  <p>I have a state-space model.</p>
  
  <p>Could anybody please help me or give me any idea why lyapchol does now work properly?
  Thank you very much advance.</p>