Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15179 > unrolled thread
| Started by | graser <graser@gmail.com> |
|---|---|
| First post | 2013-07-17 05:45 +0000 |
| Last post | 2013-07-17 05:45 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Export Import Array graser <graser@gmail.com> - 2013-07-17 05:45 +0000
| From | graser <graser@gmail.com> |
|---|---|
| Date | 2013-07-17 05:45 +0000 |
| Subject | Export Import Array |
| Message-ID | <ks5b2f$clf$1@smc.vnet.net> |
Dear Mathematica Users!
I have a question for you about Exporting and Importing array.
Let's say there is a array (or vector) like,
vectors =
Table[{x, y, z}, {x, -1, 1, .25}, {y, -1, 1, .25}, {z, -1, 1, .25}];
If I export vectors as "XLS" format and import the XLS file,
TT= Import["vector.xls", "XLS"];
Some funny thing happen like
TT[[1, 1, 1]] should be {-1,-1,-1} so that If I do TT[[1, 1, 1,1]] , it should give -1.
But instead of that, TT[[1, 1, 1]] gives a string as "{-1., -1., -1.}" .
If I export vectors as "Table" format and import the table file,
TR= Import["vector.data", "Table"];
It gives something like.. {"{{-1.,", "-1.,", "-1.},",.... All double comma.
Do you know how to properly export vector (or array) ?
And if I import string instead of vecotor like TT, How to convert TT like string to array?
"{-1., -1., -1.}" -> {-1,-1,-1}
Thanks!
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web