ordqz

Reorders the eigenvalues in a QZ factorization.

Category: Mathematics > Linear Algebra

Syntax

[AS, BS, QS, ZS] = ordqz(AA, BB, Q, Z, select)

Reorders (AA, BB) so that the eigenvalues chosen by select come first.

Description

The QZ algorithm triangularizes a matrix pair (A, B); the generalized eigenvalues are the ratios of diagonal entries AA(k,k)/BB(k,k). ordqz swaps diagonal entries so that a chosen group, such as the stable eigenvalues in the left half plane, is gathered at the top. This is needed to split a problem into stable and unstable subsystems.

Input arguments

AA, BB, Q, Z
Outputs of qz: triangular pair and the transformations.
select
A logical vector marking eigenvalues to move to the top left, or a keyword such as 'lhp', 'rhp', 'udi' or 'udo'.

Output arguments

AS, BS
Reordered triangular pair.
QS, ZS
Updated transformation matrices.

Example

Moving the left half plane eigenvalue first

A = [1 2; 0 -3];
B = eye(2);
[AA, BB, Q, Z] = qz(A, B);
[AS, BS, QS, ZS] = ordqz(AA, BB, Q, Z, 'lhp');
disp(diag(AS) ./ diag(BS))
Output
   -3.0000
    1.0000

See also

qz ordschur ordeig eig