Filter löschen
Filter löschen

Sorting an n x n matrix in the Jordan form.

9 Ansichten (letzte 30 Tage)
Mohammad Ayoub
Mohammad Ayoub am 23 Mär. 2017
Bearbeitet: Martin Seltmann am 28 Nov. 2018
Assume I have a matrix J (n x n dimension), the matrix is originally obtained from MATLAB using the 'jordan' function which returns the matrix in the Jordan canonical form. MATLAB always returns the matrix J sorting the diagonal from lowest to highest, until it encounters repeated eigenvalue(s), which are sorted in Jordan blocks in the lower right corner of the matrix. Here's an example:
A = [0 1 0 0 0;
0 0 1 0 0;
0 0 0 1 0;
0 0 0 0 1;
-18 -57 -68 -38 -10];
J = jordan(A)
J = [-2 0 0 0 0;
0 -3 1 0 0;
0 0 -3 0 0;
0 0 0 -1 1;
0 0 0 0 -1]
The question is, is it possible to sort Matrix J's diagonal from highest to lowest (e.g. here [-1;-1;-2;-3;-3]) while keeping the Jordan blocks associated with each repeated eigenvalue?
In my example I want J to look like
[-1 1 0 0 0;
0 -1 0 0 0;
0 0 -2 0 0;
0 0 0 -3 1;
0 0 0 0 -3],
I want to make this transformation to any matrix of order n (n x n).
Thank you in advance.
Regards, M Ayoub.
  1 Kommentar
Jan
Jan am 23 Mär. 2017
Bearbeitet: Jan am 23 Mär. 2017
What do you want for:
J = [-2 0 0 0 0;
0 -3 1 0 0;
0 0 -4 2 0; % <- 2 beside the diagonal
0 0 0 -1 1;
0 0 0 0 -1]
If the -3 is moved to the last row, there is no place for the 2. Can this happen?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

David Goodmanson
David Goodmanson am 25 Mär. 2017
Hello Mohammad, I believe the following code works for a given Jordan matrix J.
a = sort(diag(J),'descend');
d = diff(a)==0; % look for repeated elements
Jnew = diag(a) + diag(d,1);
This code does not permute the elements of the original Jordan matrix but rather sorts the diagonal elements, so it is sensitive to any very small unintended numerical differences in the diagonal elements. The Jordan decomposition itself has the same issues so I don't think that this process adds new complications.
  1 Kommentar
Martin Seltmann
Martin Seltmann am 28 Nov. 2018
Bearbeitet: Martin Seltmann am 28 Nov. 2018
The proposal seems to assume that identical eigenvalues belong to the same Jordan block. But this does not have to be the case, there could be several Jordan blocks for the same eigenvalue.

Melden Sie sich an, um zu kommentieren.

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by