Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Parametric List Plot??
Replies: 4   Last Post: Apr 21, 2013 5:17 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexei Boulbitch

Posts: 483
Registered: 2/28/08
Re: Parametric List Plot??
Posted: May 15, 2012 4:54 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

For some phase portraits I want to plot two lists of data in one plot
(x and y axis).
I found ParametricPlot for functions but need that parametric part
combined with ListPlot..?
Thanks in advance!

To the best of my knowledge, there is no such a function. There is, however, a simple work around.
Say, for example, you need to solve this:

sol = NDSolve[{y''[t] == Sin[y[t]], y[0] == 1, y'[0] == 0},
y[t], {t, 0, 3 \[Pi]}][[1]]

{y[t] -> \!\(\*
RowBox[{"InterpolatingFunction", "[",
RowBox[{"0.`", ",", "9.42477796076938`"}], "}"}], "}"}],
",", "\<\"<>\"\>"}], "]"}],

The result is the interpolation function. Now you need a numeric calculus package:


With this you easily find the numeric derivative, ND[ ], of the solution. Let us package it into a list
With the following structure {...{y[t],y'[t]}...}:

lst = Table[{y[t] /. sol /. t -> t1, ND[(y[t] /. sol), t, t1]}, {t1,
0, 2. \[Pi], 0.05}];

Here is your phase portrait:


Evaluate it.

Have fun, Alexei

Alexei BOULBITCH, Dr., habil.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44

e-mail: alexei.boulbitch@iee.lu

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.