linsolve behaviour for SYM true and POSDEF false

1 回表示 (過去 30 日間)
Sylvan Elhay
Sylvan Elhay 2024 年 9 月 29 日
コメント済み: Sylvan Elhay 2024 年 9 月 30 日
Does linsolve use an LDL factoring if the options are SYM true and POSDEF false?
  7 件のコメント
Torsten
Torsten 2024 年 9 月 30 日
編集済み: Torsten 2024 年 9 月 30 日
linsolve will use the same solver as mldivide if you specify that your matrix is symmetric indefinite, and according to the flowchart of solvers under
mldivide would use LU for full matrices and LDL for sparse matrices. But better you recheck the yes/no cases in the two flowcharts in the "Algorithms" section.
To be sure you could also contact MATLAB support directly:
Sylvan Elhay
Sylvan Elhay 2024 年 9 月 30 日
Thanks for all the comments.
Background: I am comparing computation times for solution of 2 sparse systems: one is SYM, INDEF and invertible and the other is square and invertible. I am now comparing the times of LU and LDL so there is no checking of matrix structure by Matlab before solving and the timings reflect only the solution process times.
Thanks again.

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

回答 (1 件)

Vandit
Vandit 2024 年 9 月 29 日
編集済み: Vandit 2024 年 9 月 29 日
Hello Sylvan,
The "linsolve" function does not use LDL factorization if the options are set to 'SYM' true and 'POSDEF' false. Instead, it will use the appropriate solver based on the properties specified in the options structure. If 'SYM' is true, it will typically use a method suitable for symmetric matrices, but without the positive definiteness condition, it won't specifically apply LDL factorization.
For more information on "linsolve" function, please refer to the below documentation:
Hope this helps.
  2 件のコメント
Sylvan Elhay
Sylvan Elhay 2024 年 9 月 29 日
I guess it does answer the question. Thank you. What I really should have asked is "which factoring does linsove use in that case?"
Sylvan Elhay
Sylvan Elhay 2024 年 9 月 29 日
I ask because I could not see an answer to that question in the documentation.

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

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by