Re: Manipulate problems again
- To: mathgroup at smc.vnet.net
- Subject: [mg99128] Re: Manipulate problems again
- From: dh <dh at metrohm.com>
- Date: Tue, 28 Apr 2009 04:43:21 -0400 (EDT)
- References: <gt3f2h$ic4$1@smc.vnet.net>
Hi Sean, you had a superfluous brace around the variables of Manupulate. I also simplified your expression a bit: ======================================== ClearAll["Global`*"] Manipulate[{anpsol = NDSolve[{a''[t] == -k1 k2 a[t] - k1 a'[t] + k3 a'[t], a[0] == k2/k1, a'[0] == 0}, {a[t], a'[t]}, {t, 0, 20}]; Print[anpsol]; Plot[Evaluate[sol], {t, 0, 20}, PlotRange -> All, FrameLabel -> {t, a and a'}, AspectRatio -> 1/GoldenRatio], ParametricPlot[Evaluate[sol], {t, 0, 20}, PlotRange -> All, FrameLabel -> {a, a'}, AspectRatio -> 1/GoldenRatio]}, {k1, 0.1, 10}, {k2, 0.1, 10}, {k3, 0.11, 10}, {b0, 0.1, 10}] ========================================= Daniel sean_incali at yahoo.com wrote: > Hello group, > > I'm having problems with this... > > ClearAll["Global`*"] > > Manipulate[ > { > anpsol := NDSolve[{a''[t] == -k1 k2 a[t] - k1 a'[t] + k3 a'[t], a[0] > == k2/k1, a'[0] == 0 }, {a[t], a'[t]}, {t, 0, 20}]; > > Plot[Evaluate[{a[t], a'[t]} /. anpsol], {t, 0, 20}, PlotRange -> All, > FrameLabel -> {t, a and a'}, AspectRatio -> 1/GoldenRatio], > > ParametricPlot[Evaluate[{a[t], a'[t]} /. anpsol], {t, 0, 20}, > PlotRange -> All, FrameLabel -> {a, a'}, AspectRatio -> 1/ > GoldenRatio] > }, > {{k1, 0.1, 10}, {k2, 0.1, 10}, {k3,0.11, 10}, {b0, 0.1, 10}}] > > > Thanks for any insight. > > Sean > >