res = DiagonalMatrix[SparseArray[bandU], 1] + DiagonalMatrix[SparseArray[bandD]] + DiagonalMatrix[SparseArray[bandL], -1];
then I used the function with the following parameters (without semicolon):
gmat[100, 0.8, 1]
...and everything was ok! a 100x100 sparse matrix was created and the "predictive interface bar" appeared.
Nevertheless, when I typed (without semicolon):
gmat[10000, 0.8, 1]
...everything went not so good, a 10000x10000 sparse matrix was created (what was ok), but the kernel went nuts with the memory use, some gigabytes for a small sparsearray (You can try with greater parameters, but starting with K=5000 things go weird)
I think the problem has to do with the "predictive interface" that tries to generate the normal form of the matrix, so it uses a lot of memory (and even produces a kernel crash).
Has anyone had the same problem with SparseArray? or have any explanation to what actually happens? or it is just me?
Many thanks in advance for any help or advice with this issue.
Jose M. Martinez Ph.D. Student Department of Electronic Engineering Universidad Tecnica Federico Santa Maria Valparaiso, Chile