Re: Memory and NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg85413] Re: Memory and NDSolve
- From: "marks at wolfram.com" <marks at wolfram.com>
- Date: Sun, 10 Feb 2008 05:09:03 -0500 (EST)
- References: <foek2h$i0m$1@smc.vnet.net>
If you only want the solution at the end of the interval, and not all the intermediary steps, then use the syntax: NDSolve[eqs, vars, {t, tf, tf}] instead of NDSolve[eqs, vars, {t, ti, tf}] The result is still returned as an InterpolatingFunction but it only contains the data at the end of the integration tf. If you make sure to use the same variable for the solution in the loop then previous references will be freed when the new solution is allocated. Mark Sofroniou, Wolfram Research