- To: mathgroup at smc.vnet.net
- Subject: [mg61459] Re: NestList
- From: ggroup at sarj.ca
- Date: Wed, 19 Oct 2005 02:17:16 -0400 (EDT)
- References: <firstname.lastname@example.org>
- Sender: owner-wri-mathgroup at wolfram.com
Tony Harker wrote: > The particular application I have in mind is a simple finite difference > solution of the wave equation, where I might want to use NestList rather > than Nest so that I can animate the results. If the simulation involves two > spatial dimensions, storing duplicate copies of the information is a > significant problem. In fact in my application it's better to collect the > animation frames at rather lower frequency than they are calculated, to > get a reasonable compromise between accuracy and visual impact, so I > tend not to use NestList, but might this extension be useful in other > areas. Or have I just missed a clever trick? If you have an iterator variable (or variables), one easy way is to create plots every n'th calculation is to wrap your plot and/or storage commands in an if statement. The condition to use would be something along the lines of: Mod[(iterator), n]==0. I'm not entirely clear how you're using NestList in your application, but setting up dummy iterators shouldn't be too hard.