Re: Multiple DE solutions in ParametricPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg102324] Re: Multiple DE solutions in ParametricPlot
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Wed, 5 Aug 2009 05:45:46 -0400 (EDT)
- References: <h58rc9$q4c$1@smc.vnet.net>
Narasimham wrote:
> How may it be possible to get several ParametricPlots together? TIA
> for pointing errors here.
>
> XY = {x, y} /.
> First /@ (NDSolve[{y'[t] + x[t] 2 == 0, -x'[t] + y[t]^3 == 2,
> x[0] == #1, y[0] == #2},
> {x, y}, {t, 0, 3.4}] & @@@ {{-2.1, 0.8}, {.5, .6}, {1, -.2}})
>
> ParametricPlot[Evaluate[#[t] & /@ XY], {t, 0, 3.4}]
>
> Regards
> Narasimham
>
If you look at the output of #[t]&/@XY:
{{InterpolatingFunction[{{0.`,3.4`}},"<>"],
InterpolatingFunction[{{0.`,3.4`}},"<>"]}[t],
{InterpolatingFunction[{{0.`,3.4`}},"<>"],
InterpolatingFunction[{{0.`,3.4`}},"<>"]}[t],
{InterpolatingFunction[{{0.`,3.4`}},"<>"],
InterpolatingFunction[{{0.`,3.4`}},"<>"]}[t]}
That is not what you wanted. You wanted [t] just behind every
InterpolatingFunction[...]
But this will work:
ParametricPlot[
Evaluate[Table[#[t] & /@ XY[[i]], {i, 1, Length[XY]}]],
{t, 0, 3.4}]
--
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de