Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Varying a constant in an ODE to Manipulate solution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126858] Re: Varying a constant in an ODE to Manipulate solution
  • From: Narasimham <mathma18 at hotmail.com>
  • Date: Thu, 14 Jun 2012 05:29:11 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jr9kpt$3lp$1@smc.vnet.net>

On Jun 13, 1:59 pm, Narasimham <mathm... at hotmail.com> wrote:

Same topic is continued from two months or so before.
Thanks to Murray Eisenberg and Bob Hanlon for earlier response.

> All variables (or a single variable) can be easily picked out from sol[c_]
> list for plotting. But how to pick out two out of them for ParametricPlot(2D) ?

> sol[c_] := {x[t], y[t], z[t]} /.
>   First[NDSolve[{y''[t] + Sin[y[t]/c] == 0, y'[0] == 0,
>      y[0] == 1/(1 + c), x'[t] == t, x[0] == c^2,
>      z'[t] == 2 c x[t] - y[t], z[0] == 2}, {x, y, z}, {t, -3, 3}]]
> Manipulate[
>  Plot[Evaluate[sol[c]], {t, -3, 3}, PlotStyle -> {Red, Thick},
>   AspectRatio -> Automatic,
>   PlotRange -> {{-3, 3}, {-10, 10}}], {c, -0.5, 2, 0.2}]
> Manipulate[
>  Plot[Evaluate[sol[c][[1]]], {t, -3, 3}, PlotStyle -> {Red, Thick},
>   AspectRatio -> Automatic,
>   PlotRange -> {{-3, 3}, {-10, 10}}], {c, -0.5, 2, 0.2}]
> " 2 parameter Dynamic manipulation not OK "
> Manipulate[
>  Plot[{Evaluate[sol[c][[1]]], Evaluate[sol[c][[1]]]}, {t, -3, 3},
>   PlotStyle -> {Green, Thick}, AspectRatio -> Automatic,
>   PlotRange -> {{-3, 3}, {-10, 10}}], {c, -0.5, 2, 0.2}]

> Regards
> Narasimham




  • Prev by Date: Re: Memory Blowup Issues
  • Next by Date: Re: ToString Awkwardness
  • Previous by thread: Re: Varying a constant in an ODE to Manipulate solution
  • Next by thread: Graph plotting and "The precision of the argument function is less