I have a square matrix with each diagonal be the same number. For instance, 4x4 matrix
[ 1 2 3 4; -2 1 2 3; -3 -2 1 2; -4 -3 -2 1]
I am trying to use spdiags to save the storage but it turns out that it use even more space. In my program, the size of the matrix is so big (at least 10000x10000), so I am looking for a better way to store this full-band matrix to save space.