Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10757 > unrolled thread
| Started by | mrafiee20@gmail.com |
|---|---|
| First post | 2012-07-03 02:22 +0000 |
| Last post | 2012-07-05 18:53 +0000 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
how to export to Excel in Mathematica from a Parametricplot command mrafiee20@gmail.com - 2012-07-03 02:22 +0000
Re: how to export to Excel in Mathematica from a Parametricplot command "Alexey Popkov" <lehin.p@gmail.com> - 2012-07-04 07:36 +0000
Re: how to export to Excel in Mathematica from a Parametricplot command Dominik Hezel <sendme2000@me.com> - 2012-07-04 07:37 +0000
Re: how to export to Excel in Mathematica from a Parametricplot command "Alexey Popkov" <lehin.p@gmail.com> - 2012-07-05 18:52 +0000
Re: how to export to Excel in Mathematica from a Parametricplot command Dominik Hezel <sendme2000@me.com> - 2012-07-05 18:53 +0000
| From | mrafiee20@gmail.com |
|---|---|
| Date | 2012-07-03 02:22 +0000 |
| Subject | how to export to Excel in Mathematica from a Parametricplot command |
| Message-ID | <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.?
[toc] | [next] | [standalone]
| From | "Alexey Popkov" <lehin.p@gmail.com> |
|---|---|
| Date | 2012-07-04 07:36 +0000 |
| Message-ID | <jt0rq6$1h5$1@smc.vnet.net> |
| In reply to | #10757 |
<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
[toc] | [prev] | [next] | [standalone]
| From | Dominik Hezel <sendme2000@me.com> |
|---|---|
| Date | 2012-07-04 07:37 +0000 |
| Message-ID | <jt0rs3$1ho$1@smc.vnet.net> |
| In reply to | #10757 |
You'll probably get some more elegant solutions, but this works:
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}]
exp = Evaluate[{x[t], y[t]} /. First[%]];
exp2 = exp[[1, 3, 2, 2, 1]];
Export["Desktop/exp.xls", exp2]
You might want to transpose it before export.
.Dominik
[toc] | [prev] | [next] | [standalone]
| From | "Alexey Popkov" <lehin.p@gmail.com> |
|---|---|
| Date | 2012-07-05 18:52 +0000 |
| Message-ID | <jt4np8$4n6$1@smc.vnet.net> |
| In reply to | #10757 |
<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
[toc] | [prev] | [next] | [standalone]
| From | Dominik Hezel <sendme2000@me.com> |
|---|---|
| Date | 2012-07-05 18:53 +0000 |
| Message-ID | <jt4nr5$4nr$1@smc.vnet.net> |
| In reply to | #10757 |
You'll probably get some more elegant solutions, but this works:
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}]
exp = Evaluate[{x[t], y[t]} /. First[%]];
exp2 = exp[[1, 3, 2, 2, 1]];
Export["Desktop/exp.xls", exp2]
You might want to transpose it before export.
.Dominik
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web