functionrsf2

Computes the real Schur form (RSF) of a square matrix but uses lapack.dgees

Information

Syntax

(T, Z, alphaReal, alphaImag) = Matrices.rsf2(A)

Description

Function rsf2 (real Schur form) calculates the real Schur form af a real square matrix A, i.e.

A = Z*T*ZT

with the real nxn matrices T and Z. Z is an orthogonal matrix. T is an block upper triangular matrix with 1x1 and 2x2 blocks in the diagonal. The 1x1 blocks contains the real eigenvalues of a. The 2x2 blocks are matrices with the conjugated complex pairs of eigenvalues, whereas the real parts of the eigenvalues are the elements of the diagonal.

The calculation is performed stepwise using lapack.dgees, i.e. using the internal mehtods of balacing and scaling of dgees.

Example

  Real A[3,3] = [1, 2, 3; 4, 5, 6; 7, 8, 9];
  Real T[3,3];
  Real Z[3,3];
  Real alphaReal[3];
  Real alphaImag[3];

algorithm
  (T, Z, alphaReal, alphaImag):=Modelica_LinearSystems2.Math.Matrices.rsf2(A);
//   T = [16.12, 4.9,   1.59E-015;
//        0,    -1.12, -1.12E-015;
//        0,     0,    -1.30E-015]
//   Z = [-0.23,  -0.88,   0.41;
//        -0.52,  -0.24,  -0.82;
//        -0.82,   0.4,    0.41]
//alphaReal = {16.12, -1.12, -1.32E-015}
//alphaImag = {0, 0, 0}

See also

Math.Matrices.rsf

Inputs

TypeNameDefaultDescription
Real[:,size(A, 1)]A

Outputs

TypeNameDefaultDescription
Real[size(A, 1),size(A, 2)]S
Real[size(A, 1),size(A, 2)]QZ
Real[size(A, 1)]alphaRealReal part of eigenvalue=alphaReal+i*alphaImag
Real[size(A, 1)]alphaImagImaginary part of eigenvalue=(alphaReal+i*alphaImag