テキストファイルから最初の数行および最後の数行を読み取りたい
Show older comments
---------------------text.txt---------------------
header1
header2
DATASTART
DATA DATA DATA DATA DATA DATA
DATA DATA DATADATA DATA DATA
DATA DATA DATADATA DATA DATA
DATA DATA DATADATA DATA DATA
DATAEND
footer1
footer2
footer3
---------------------------------------------------
上記のようにヘッダー・データ・フッタの3要素で構成されたテキストファイルがあります。
ヘッダとフッタの個数は未知であるとします。
このテキストファイルからヘッダーとフッタの文字列を取得する良い方法はありますか?
Accepted Answer
More Answers (0)
Categories
Find more on Text Data Preparation 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!