weichanghe2000 发表于 2010-12-26 11:50:08

Mathematica 怎样导入文件中的部分内容

本帖最后由 weichanghe2000 于 2010-12-26 15:59 编辑

Hi,大家好,假如我有一个文件,有上千行,但是我只想 Mathematica 导入其中 的一部分行(比如第2行,3,6,……1000,2400行?),怎样做到?
举个例子:
The first element returned is the
regular expression, while the rest
of the elements have to do with conditions,
replacement rules, and named patterns.
The regular expression is then compiled
by PCRE, and the compiled version is cached
for future use when the same pattern appears
again. The translation from symbolic string pattern
to regular expression only happens once.

我想读取 第3,4,7,11行,Mathematica 怎样做到?先谢谢大家的帮助了。

guocong89 发表于 2011-1-8 14:05:35

Part, {1, 2, 5}]

weichanghe2000 发表于 2011-1-8 15:27:09

谢谢2#,你的解答很好,很强大,果然做到了,你真是太好了。

潘局 发表于 2011-1-12 14:05:24

页: [1]
查看完整版本: Mathematica 怎样导入文件中的部分内容