extracting specific values between two characters within text file

2 ビュー (過去 30 日間)
sermet 2017 年 3 月 10 日
コメント済み: Guillaume 2017 年 3 月 10 日
I have a data text file. One parts of this file looks like;
I need to extract each numeric values between > and < orderly. These numeric values' fractional parts are not constant within the data file.


Image Analyst
Image Analyst 2017 年 3 月 10 日
See the help on "Importing XML Documents". You can probably use xmlread().
  1 件のコメント
Guillaume 2017 年 3 月 10 日
Yes, the file looks like xml, which shouldn't be parsed as if it was a text file without a great deal of care.
In particular, the order in which the tags appear is not guaranteed at all with xml, so just reading the numerical values without checking which tag they belong to would be extremely foolish.
As Image Analyst says, use xmlread and/or the file exchange xml2struct.


その他の回答 (0 件)


Find more on Data Import and Export in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by