mldivide algorithm for sparse matrices

1 回表示 (過去 30 日間)
paolo77
paolo77 2016 年 12 月 16 日
コメント済み: paolo77 2016 年 12 月 22 日
In the documentation of the mldivide function, two flow charts report the steps used by MATLAB to decide which method to apply in order to solve the linear system Ax=b with A\b. When A is sparse, if A is not diagonal, the algorithm asks:
"Does A look triangular (Upper or lower bandwidth of 0)?"
If YES, then
"Is A actually triangular (diagonal is structurally nonzero)?"
If NO then
"Is A permuted triangular?"
I am not able to imagine a non diagonal, permuted triangular matrix having 0 upper/lower bandwidth. Any suggestion?

回答 (1 件)

Sally Al Khamees
Sally Al Khamees 2016 年 12 月 22 日
Let matrix A =
1 0 0
2 3 1
4 1 0
Then A looks triangular (upper bandwidth of 0).
A is not actually a triangular matrix because A(2,3) is not 0
A is a permuted triangular. If you switch row 2 with row 3 then A becomes
1 0 0
4 1 0
2 3 1
You can also refer to "LU matrix factorization" documentation page for example of functions that return permuted lower triangular matrix
  1 件のコメント
paolo77
paolo77 2016 年 12 月 22 日
Thank you Sally for your answer.
However, it seems to me that the matrix A that you propose has an upper bandwidth which is 1 and not 0; MATLAB seems to agree:
[lowband, upband]=bandwidth([1 0 0; 2 3 1; 4 1 0])
returns lowband=2 and upband=1. I would then expect this matrix to fail the first test ("Does A look triangular (Upper or lower bandwidth of 0)?").

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

カテゴリ

Help Center および File ExchangeSparse Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by