search for aline in text file a delete it!

1 visualización (últimos 30 días)
Rica
Rica el 6 de Nov. de 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

Respuesta aceptada

Jan
Jan el 6 de Nov. de 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.

Más respuestas (1)

Rica
Rica el 6 de Nov. de 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!

Categorías

Más información sobre Text Data Preparation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by