フィルターのクリア

Sorting an n x n matrix in the Jordan form.

3 ビュー (過去 30 日間)
Mohammad Ayoub
Mohammad Ayoub 2017 年 3 月 23 日
編集済み: Martin Seltmann 2018 年 11 月 28 日
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 件のコメント
Jan
Jan 2017 年 3 月 23 日
編集済み: Jan 2017 年 3 月 23 日
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?

サインインしてコメントする。

回答 (1 件)

David Goodmanson
David Goodmanson 2017 年 3 月 25 日
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 件のコメント
Martin Seltmann
Martin Seltmann 2018 年 11 月 28 日
編集済み: Martin Seltmann 2018 年 11 月 28 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by