Skip to main content

All Questions

7 votes
5 answers
654 views

Elegant method of generating this matrix?

Good evening, I need to determine an elegant (as possible) method of computing an $n\times n$ matrix below (the matrix shown is just a $16\times16$ example). I've been toying with ...
gKirkland's user avatar
  • 771
19 votes
2 answers
786 views

Additive SparseArray Assembly

The goal is to assemble a SparseArray in an additive fashion. Let us assume we have a large List of indices (some will be ...
leibs's user avatar
  • 758
8 votes
3 answers
1k views

How to create a large sparse block matrix

I need to generate a very large sparse block matrix, with blocks consisting only of ones along the diagonal. I have tried several ways of doing this, but I seem to always run out of memory. The ...
Jesper's user avatar
  • 81