I already posted a similar problem, but this one is different. I want to create and export a $ (n\times n)$ -Matrix and later on implement it again. My code works and for $ (8000\times8000)$ my Matrix will be created. If I want to increase the number ,i.e. speaking of $ 10. 000\times10.000$ or even $ 50.000\times50.000$ Mathematica won’t do the job – and I don’t even know why. The calculation just stops without a notification, the matrix won’t be exported.
I’ll post my code below. $ f[t]$ is a (yet) unknown function (My Matrix will depend on it) and $ N2$ denotes the dimension of my matrix ($ N2$ has to be even). The matrix I want to export is MatrixF[N2] depending on $ N2$ . :
SetDirectory[NotebookDirectory[]]; N2 = 10000; F = Table[q[i, j], {i, N2}, {j, N2}]; Do[ q[i, i + 1] = 1; q[i + 1, i + 2] = 1; q[i + 1, i + 1] = 2/3 h^2 f[i - i]; q[i, i] = h^2 f[i - i]; q[i + 1, i] = 8/3 h^2 f[1] - 1; q[i, i - 1] = 2 h^2 f[1] - 1; Do[ q[j + 1, j - i + 1 - 2] = 8/3 h^2 f[i + 2]; q[j, j - i - 2] = 2 h^2 f[i + 2]; q[j + 1, j + 1 - i - 1] = 4/3 h^2 f[i + 1]; q[j, j - i - 1] = 2 h^2 f[i + 1]; , {j, 1, N2, 2} ]; , {i, 1, N2 - 1, 2} ]; q[N2, N2 - 1] = 8/3 h^2 f[1] - 4; q[N2, N2 - 2] = 1 + 4/3 h^2 f[2]; q[N2, N2] = 2/3 h^2 f[0] + 3; MatrixF[N2] = LowerTriangularize[F, 1]; Export["MatrixF" <> ToString[N2] <> ".m", MatrixF[N2]]
If I set N2=10 or 8000 it will work. Thanks already for your help!