I am writing a code for solving a symmetric band matrix by Cholesky decomposition. I need to store the matrix by defining only the non-zero diagonals of the matrix not the full matrix with band size $n$. How can one do that?

  • 2
    $\begingroup$ What about SparseArray? $\endgroup$ – Henrik Schumacher Jan 25 '19 at 19:23
  • $\begingroup$ I am not allowed to use it as my professor asked to create the code from blank!! $\endgroup$ – strange world Jan 25 '19 at 19:52
  • $\begingroup$ Then what about storing the diagonals of the matrix in conventional arrays? $\endgroup$ – Henrik Schumacher Jan 25 '19 at 20:36
  • $\begingroup$ I tried taking the Cholesky decomposition on a couple of symmetric band matrices, but it didn't work because they were not "sufficiently positive definite". Would be good to know some examples of band matrices one can experiment with. $\endgroup$ – C. E. Jan 25 '19 at 21:08
  • $\begingroup$ Hilbert matrix of n=5 is trivial case of a band matrix $\endgroup$ – strange world Jan 25 '19 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.