0
$\begingroup$

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?

$\endgroup$
7
  • 2
    $\begingroup$ What about SparseArray? $\endgroup$ Jan 25, 2019 at 19:23
  • $\begingroup$ I am not allowed to use it as my professor asked to create the code from blank!! $\endgroup$ Jan 25, 2019 at 19:52
  • $\begingroup$ Then what about storing the diagonals of the matrix in conventional arrays? $\endgroup$ Jan 25, 2019 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, 2019 at 21:08
  • $\begingroup$ Hilbert matrix of n=5 is trivial case of a band matrix $\endgroup$ Jan 25, 2019 at 21:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.