How to determine which algorithm mldivide (A\b) uses
28 ビュー (過去 30 日間)
I have a sparse, banded matrix, A, for which I am solving the linear system Ax=b using A\b in Matlab.
The documentation for mldivide shows a flow chart that explains which solver it will use. However, I would like to automate the process of determining the best algorithm. Therefore, I would really just like to know which algorithm mldivide chooses for different inputs. Is there a way to get this information out?
回答 (3 件)
Grzegorz Knor 2017 年 4 月 19 日
For sparse matrices check function spparms :
On my computer it produces:
sp\: bandwidth = 2+1+2.
sp\: is A diagonal? no.
sp\: is band density (1) > bandden (0.5) to try banded solver? yes.
sp\: is LAPACK's banded solver successful? yes.
Jan 2015 年 10 月 27 日
編集済み: Jan 2015 年 10 月 27 日
I'm not sure if I understand your question. You explain:
The documentation for mldivide shows a flow chart that explains which solver it will use.
Is this not a valid answer of your question already? Or are you looking for the name of the library function instead of the name of the solver? Matlab does not offer the source code for mldivide.