search for aline in text file a delete it!

1 回表示 (過去 30 日間)
Rica
Rica 2012 年 11 月 6 日
Hi! i have a text file . in this file i have text and measurement data. the text is not mixed with the data. in each line i hve data OR Text.
exempele:
measurement data1
Freq mag S D
1 2 3 3
2 4 5 8
1 4 5 6
measurement data2
Freq mag S D
1 2 3 3
2 4 5 8
1 4 5 6
and so on ans so fort..............
Thank for the help

採用された回答

Jan
Jan 2012 年 11 月 6 日
The question is not clear. Does the file contain the empty lines or is this an artifact of pasting to the forum? Please post the exact input and the wanted output. Consider, that you cannot delete characters inside a text file. You have to import the file, remove the lines in the memory and re-write the file afterwards.

その他の回答 (1 件)

Rica
Rica 2012 年 11 月 6 日
input:
measurement data1
Freq mag S D
1 2 3 3
2 4 5 8
1 4 5 6
measurement data2
Freq mag S D
1 2 3 3
2 4 5 8
1 4 5 6
the wanted output:
%
1 2 3 3
2 4 5 8
1 4 5 6
1 2 3 3
2 4 5 8
1 4 5 6
Thank u!

カテゴリ

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