.Modelica_LinearSystems2.Math.Matrices.rsf2

Information

Syntax

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

Description

Function rsf2 (real Schur form) calculates the real Schur form of 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

Interface

function rsf2
  import Modelica_LinearSystems2.Math.Matrices;
  import Modelica_LinearSystems2.Math.Matrices.Internal;
  import Modelica_LinearSystems2.Math.Matrices.LAPACK;
  input Real A[:, size(A, 1)];
  output Real S[size(A, 1), size(A, 2)];
  output Real QZ[size(A, 1), size(A, 2)];
  output Real alphaReal[size(A, 1)] "Real part of eigenvalue=alphaReal+i*alphaImag";
  output Real alphaImag[size(A, 1)] "Imaginary part of eigenvalue=(alphaReal+i*alphaImag";
end rsf2;

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos