Azzera filtri
Azzera filtri

search for aline in text file a delete it!

1 visualizzazione (ultimi 30 giorni)
Rica
Rica il 6 Nov 2012
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

Risposta accettata

Jan
Jan il 6 Nov 2012
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.

Più risposte (1)

Rica
Rica il 6 Nov 2012
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!

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by