MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Animating Solutions of NDSolve with respect to Initial Conditions


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}];
> 



  • Prev by Date: Re: Animating Solutions of NDSolve with respect to Initial Conditions
  • Next by Date: Re: How to solve nonlinear equations?
  • Previous by thread: Re: Animating Solutions of NDSolve with respect to Initial Conditions
  • Next by thread: Re: How to solve nonlinear equations?