Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10470
| From | Murray Eisenberg <murray@math.umass.edu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Varying a constant in an ODE to Manipulate solution |
| Date | 2012-06-15 07:41 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jreout$nqu$1@smc.vnet.net> (permalink) |
| References | <201206130857.EAA03730@smc.vnet.net> |
It's not clear to me what you want to do. Do you want to create
3D-parametric plot of the trajectory in space -- possibly as a dynamic
with the time t as dynamic parameter? Or a 3D-parametric plot of the
trajectory over a fixed-duration time interval, but dynamic with c as
control variable?
And/or do one of those same things but do it just in 2D, selecting some
pair of the 3 components of the solution function?
On 6/13/12 4:57 AM, Narasimham wrote:
> 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}]
--
Murray Eisenberg murrayeisenberg@gmail.com
80 Fearing Street phone 413 549-1020 (H)
Amherst, MA 01002-1912
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Varying a constant in an ODE to Manipulate solution Murray Eisenberg <murray@math.umass.edu> - 2012-06-15 07:41 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-06-17 20:46 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-06-19 07:17 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-06-21 09:20 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-06-17 07:57 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-06-22 09:14 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-06-23 08:26 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-07-01 06:14 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-07-02 09:24 +0000
Re: Varying a constant in an ODE to Manipulate solution Narasimham <mathma18@hotmail.com> - 2012-07-02 09:31 +0000
csiph-web