Borrar filtros
Borrar filtros

how to read several ascii text file in a folder and avoid the header in each text file

1 visualización (últimos 30 días)
I have several number of ascii text files in a folder. each text file contains a column data and a header lines. I wants to read the data from all the text files and arrange the data into a single variable. also I wants to read the header lines and extract the variables from the header files. how to make a program for that?

Respuestas (1)

dpb
dpb el 20 de Sept. de 2014
Start w/ the FAQ...
I strongly recommend the DIR solution. As for the header, simply write an appropriate format string to parse the required data from it, then read the rest of the file. See the doc under textscan and friends for details and there are a zillion threads on the forum illustrating specific cases as guides as well as the examples in the documentation.

Categorías

Más información sobre String Parsing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by