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 CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by