How to pull out numbers from a text file?

3 ビュー (過去 30 日間)
Hail
Hail 2017 年 4 月 21 日
コメント済み: Walter Roberson 2017 年 4 月 21 日
I have a large text file containing sentences, paragraphs, etc. I need a script that scans through the text file and create an array of only the numbers contained in the text file.
  1 件のコメント
Walter Roberson
Walter Roberson 2017 年 4 月 21 日
List the exact set of formats that numbers might occur in.
For example, is .E+30 a valid number for your purposes? If you permit 0.E+30 and you permit .0E+30 then is .E+30 also permitted? Are the + always omitted but - are used, so 0.E30 and 0.E-30 would be permitted but not +0.E30 or 0.E+30 ? Can 'e' be used instead of 'E' ? Can 'D' be used instead of 'E' ? Can there be complex numbers? If there is an integer, is it permitted for it to be followed by '.', so 12345. ? Or is '.' always followed by a digit?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeText Data Preparation についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by