I have a text file which is several GB in size and contains one large formula. I have created this file in another program which I use for analytical transformations. Now I need to insert numbers into this formula, which I tried to do in Mathematica so far. With my current approach it is taking extremely long. What things do I need to consider that are important for efficiency?
total = StringDelete[
Import["Example.txt"], {" ", "\n", ";"}
] // ToExpression;
Table[{x, total}, {x, -180, 180, 10}]
I am just giving my general approach here since the stuff that has to be numerically inserted is way too large to paste it here.
Thank you very much.
A
. For an $n \times n$ matrix the symbolic method has complexity $O(n!)$ while the numerical one has complexity at most $O(n^3)$. $\endgroup$Table[{x, total}, {x, -180.0, 180.0, 10.0}]
instead ofTable[{x, total}, {x, -180, 180, 10}]
? $\endgroup$