Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: how to export to Excel in Mathematica from a Parametricplot command
Replies: 8   Last Post: Jul 5, 2012 2:53 PM

 Messages: [ Previous | Next ]
 Alexey Posts: 266 Registered: 6/14/08
Re: how to export to Excel in Mathematica from a Parametricplot command
Posted: Jul 5, 2012 2:52 PM

<mrafiee20@gmail.com> wrote: news:jstl0d\$k81\$1@smc.vnet.net...
> Hi all,
>
> This example is from Mathematica:
> http://reference.wolfram.com/mathematica/ref/ParametricPlot.html
>
> NDSolve[{y'[t] == y[t] (x[t] - 1), x'[t] == x[t] (2 - y[t]),
> x[0] == 1, y[0] == 2.7}, {x, y}, {t, 0, 10}];
> ParametricPlot[Evaluate[{x[t], y[t]} /. First[%]], {t, 0, 10}]
>
> My question is:
> How can I export the results (*.xls or *.dat) to plot it with other
> programs like Origin pro, Excel, Tecplot, etc.?
>
>

Try this:
NDSolve[{y'[t] == y[t] (x[t] - 1), x'[t] == x[t] (2 - y[t]), x[0] == 1,
y[0] == 2.7}, {x, y}, {t, 0, 10}];
f[t_] = {x[t], y[t]} /. First[%];
ParametricPlot[f[t], {t, 0, 10}]
points = First@Cases[%, l_Line :> First@l, Infinity];
Export["points.dat", points, "Table"]

HTH,

Alexey

Date Subject Author
7/2/12 mrafiee20@gmail.com
7/4/12 Bob Hanlon
7/4/12 Scot Martin
7/4/12 Alexey
7/4/12 Dominik Hezel
7/5/12 Scot Martin
7/5/12 Scot Martin
7/5/12 Alexey
7/5/12 Dominik Hezel