Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10444 > unrolled thread

Varying a constant in an ODE to Manipulate solution

Started byNarasimham <mathma18@hotmail.com>
First post2012-06-13 08:59 +0000
Last post2012-06-14 09:29 +0000
Articles 2 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-06-13 08:59 +0000
    Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-06-14 09:29 +0000

#10444 — Varying a constant in an ODE to Manipulate solution

FromNarasimham <mathma18@hotmail.com>
Date2012-06-13 08:59 +0000
SubjectVarying a constant in an ODE to Manipulate solution
Message-ID<jr9kpt$3lp$1@smc.vnet.net>
Same topic is continued. Thanks to Murray Eisenberg and Bob Hanlon

All variables or a single variable are easily pocked 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




[toc] | [next] | [standalone]


#10468

FromNarasimham <mathma18@hotmail.com>
Date2012-06-14 09:29 +0000
Message-ID<jrcau3$dot$1@smc.vnet.net>
In reply to#10444
On Jun 13, 1:59 pm, Narasimham <mathm...@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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web