Question: Saving output from iterations

Dear all,

I have seen in the forum some post on this recently but cannot find it and thus ask this question again.

I have an output from a dsolve/numeric as a set of indexed names, like KK[1], KK[2], TT[1], TT[2], etc,

where KK[1]=eval(k(t),dsn) with dsn - output of dsolve/numeric.

I want to save to the file the result of last iteration (say, 15th) which is KK[15] in order not to repat all the calculations every time I open the file. In the file, after computation, this variable is a procedure-defined function. However, the save command does not accept indexed names. When I try to assign th value to some other variable, say KK1:=KK[15] and write this name into the txt file, it saves just this assignment and not the procedure defined function which I would like to save.

Is there a trick or technique to do this?

Best, AB

Please Wait...