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

