schur(G)

NAME
schur - [ordered] Schur decomposition

CALLING SEQUENCE
[U,T] = schur(A)
[U,dim]=schur(A,flag)
[U,dim]=schur(A,macro)

PARAMETERS

A   : real or complex matrix. For ordered forms A is assumed real.

flag
    : character string ('c' or 'd')

macro
    : an ``external'' function (this parameter can also be a list or character string)

U   : orthogonal or unitary square matrix

T   : matrix

dim : integer

DESCRIPTION
Schur forms, ordered Schur forms

Usual schur form
produces a Schur matrix T
and a unitary matrix U so that A = U*T*U' and U'*U = eye(U).
By itself, schur(A) returns T.
If A is complex, the Complex Schur Form is returned in matrix T.
The Complex Schur Form is upper triangular with the eigenvalues
of A on the diagonal.
If A is real, the Real Schur Form is returned.  The Real Schur
Form has the real eigenvalues on the diagonal and the complex
eigenvalues in 2-by-2 blocks on the diagonal.

Ordered stable form
returns an unitary matrix T which transforms A into schur form.
In addition, the dim first columns of T make a basis of the
eigenspace of A associated with eigenvalues with negative
real parts (stable "continuous time" eigenspace).

returns an unitary matrix T which transforms A into schur form.
In addition, the dim first columns of T span a basis of the
eigenspace of A associated with eigenvalues with magnitude
lower than 1 (stable "discrete time" eigenspace).

General eigenspace
returns an unitary matrix T which transforms A into schur form.
In addition, the dim first columns of T span a basis of the
eigenspace of A associated with the eigenvalues which are
selected by the function a_macro.

This function must be of the following type (here a_macro is "rule"):
function [flag]=rule(x)
flag=...
x is a vector with three components which characterizes either a real eigenvalue or a pair of complex conjugate eigenvalues.

If x(1)=1, a real eigenvalue is considered and this eigenvalue is x(2)/x(3).

If x(1)=2, a pair of complex conjugate eigenvalues is considered. The sum of these two eigenvalues (twice the real part) is x(2) and the product (squared magnitude) is x(3).

On return, flag should be 1 if the real eigenvalue is selected or the pair of eigenvalues is selected and 0 otherwise.

Example of function
        function [flag]=disc(x)
        ls =x(1);flag=0;
        select  ls
           case 1 then if abs(x(2)) < ro*abs(x(3)) then flag=1;end
           case 2 then if x(3) < ro*ro then flag=1;end
        end
The function disc selects the eigenvalues with magnitude lower than a given scalar ro. And for ro=1 the calling sequence [T,dim]=schur(A,'d') and [T,dim]=schur(A,disc) are equivalent.

Another useful example is %choose (see function code in SCIDIR/macros/percent)

SEE ALSO
gschur, ricc, pbig, psmall