Re: Animating Solutions of NDSolve with respect to Initial Conditions
- To: mathgroup at smc.vnet.net
- Subject: [mg52544] Re: Animating Solutions of NDSolve with respect to Initial Conditions
- From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
- Date: Wed, 1 Dec 2004 05:58:25 -0500 (EST)
- References: <cohjd6$1of$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
If you use Map[Plot[#,options]&, list-of-plots] this forces each plot to be created separately, so you need to replace your Plot expression with the following: Map[Plot[#,{t,0,5},PlotRange->{{0,5},{-40,10}}]&,Evaluate[#[t] & /@ yvar]]; The options must include a fixed PlotRange in order to ensure that the axes are the same in each plot. Steve Luttrell "Narasimham G.L." <mathma18 at hotmail.com> wrote in message news:cohjd6$1of$1 at smc.vnet.net... > To see all circularly bent shapes of a strip fixed at one end it is > animated as follows: > > << Graphics`Animation` > MovieParametricPlot[{Sin[t*s]/t , (1 - Cos[t*s])/t}, {s, 0, 2 Pi}, > {t, -1,1}, Frames -> 20, Axes -> False, AspectRatio -> Automatic, > PlotRange -> {{-3, 7}, {-3, 7}}]; > > Like the above and unlike the example below where solutions are > superimposed in Show mode in a single frame, I like to animate an > NDSolve output to varoious Boundary Conditions to see their effect > dynamically in separate frames. How can this be done? > > yvar = y /. > First /@ (NDSolve[{y'''[t] + y[t] == 0, y[0] == #1, y'[0] == #2, > y''[0] == #3}, y, {t, 0, 2 Pi}] & @@@ {{5, 1, -2}, {5, > 1, -1}, {5, 1, 0}, {5, 1, 1}, {5, 1, 2}}); > Plot[Evaluate[#[t] & /@ yvar], {t, 0, 5}]; >