0

As I understand it, MATLAB's mldivide function uses a variety of algorithms to solve linear systems, performing various checks on the matrix involved to see what algorithm is applicable. These details are hidden from the user.

I recall that I have seen that there is some way to make MATLAB output the details of this procedure at runtime, where it prints out the result of the checks and the algorithm it decided on (LU, Cholesky, something from LAPACK even for sparse systems?). I can't find this information again despite my best attempts at searching the MATLAB forums, stackoverflow, the documentation, and the web. I know I have seen it somewhere. I was hoping someone here knows how to do this.

Failing this, can anyone tell me what algorithm mldivide would choose for the following? I have a pentadiagonal system in a sparse (2L x 2L) matrix for some whole number L

S = spdiags(myDiagonals,-2:2,2*L,2*L);

And a sparse right hand side with four nonzero entries.

b = spalloc(2*L,1,4);

Both contain complex entries in general and S it isn't symmetric or Hermitian or Toeplitz, but I'm not sure what other qualifiers might cause MATLAB to choose a specific algorithm. I calculate the inverse by

S\b

I appreciate any insights into what mldivide is doing in this case or how to get MATLAB to output the details of it's choice of algorithm. Thanks.

Amro
  • 123,847
  • 25
  • 243
  • 454
rajb245
  • 251
  • 2
  • 6
  • 2
    see [here](http://stackoverflow.com/a/18553768/97160) and [here](http://scicomp.stackexchange.com/a/1459/386). For sparse matrices, the details you were looking for can be seen by issuing the call: `spparms('spumoni',2)` – Amro Sep 06 '13 at 17:34
  • Thank you for the help. That's exactly what I was looking for, I couldn't manage to find it though. – rajb245 Sep 07 '13 at 18:07

0 Answers0