0

我正在编写一个mathematica 脚本并在linux 批处理shell 中运行它。该脚本作为结果给出了一个数字列表。我想将此列表作为单列写入文件,不带大括号和逗号。为此,我尝试使用 Export 命令作为

Export["file.txt", A1, "Table"] 

但我得到了错误:

Export::infer: 无法推断文件 test1.txt 的格式

我尝试了其他格式,但我得到了同样的错误。有人可以告诉我出了什么问题,我能做什么?预先感谢

4

2 回答 2

0

From what I understand you are trying to export the file in TABLE, why don't you try something like this ,

Export["file.txt", A1, "Text"] 
于 2012-01-26T16:23:30.420 回答
0

这个:

A1 = {1,2,3};
Export["test.tab", Transpose[{A1}], "Table"];

生成没有大括号和逗号的单列。

于 2012-01-27T20:40:07.853 回答