schtoc#
Purpose#
Reduces any 2x2 blocks on the diagonal of the real Schur matrix returned from schur()
. The transformation matrix is also updated.
Format#
- { schc, transc } = schtoc(sch, trans)#
- Parameters:
sch (matrix) – real NxN matrix in Real Schur form. i.e., upper triangular except for possibly 2x2 blocks on the diagonal.
trans (matrix) – real NxN matrix. the associated transformation matrix.
- Returns:
schc (NxN matrix) – possibly complex, strictly upper triangular. The diagonal entries are the eigenvalues.
transc (NxN matrix) – possibly complex, the associated transformation matrix.
Examples#
// Create a 2 x 2 matrix
a = { 7 -2,
12 -5 };
{ schc, transc } = schtoc(schur(a));
This example calculates the complex Schur form for a real matrix a.
Remarks#
Other than checking that the inputs are strictly real matrices, no other checks are made. If the input matrix sch is already upper triangular, it is not changed. Small off-diagonal elements are considered to be zero. See the source code for the test used.
Source#
schtoc.src
See also
Functions schur()