Mercurial > octave-nkf
diff scripts/control/are.m @ 77:1cc0af4496c6
[project @ 1993-08-30 15:33:25 by jwe]
author | jwe |
---|---|
date | Mon, 30 Aug 1993 15:33:25 +0000 |
parents | f3c9042fd609 |
children | 16a24e76d6e0 |
line wrap: on
line diff
--- a/scripts/control/are.m Mon Aug 30 15:29:38 1993 +0000 +++ b/scripts/control/are.m Mon Aug 30 15:33:25 1993 +0000 @@ -9,8 +9,10 @@ # for identically dimensioned square matrices a, b, c. If b (c) is not # square, then the function attempts to use b * b' (c' * c) instead. # -# opt is an option passed to the eigenvalue balancing routine; default -# is `B'. +# Solution method: apply Laub's Schur method (IEEE Trans. Auto. Contr, +# 1979) to the appropriate Hamiltonian matrix. +# +# opt is an option passed to the eigenvalue balancing routine default is "B". # # See also: balance @@ -56,7 +58,9 @@ # n-1 # rank ([ B A*B ... A^ *B]) method - [u, s] = schur (balance ([a, -b; -c, -a'], opt), "A"); + [d, h] = balance ([a, -b; -c, -a'], opt), "A" + [u, s] = schur (h, "A"); + u = d * u; n1 = n + 1; n2 = 2 * n; x = u (n1:n2, 1:n) / u (1:n, 1:n);