Borrar filtros
Borrar filtros

How to open a .txt file with header information

50 visualizaciones (últimos 30 días)
flemingtb
flemingtb el 8 de Mayo de 2018
Comentada: Fangjun Jiang el 8 de Mayo de 2018
I have a large data file, temperature data to be exact, the file output from the sensor is .txt. The first 12 rows are header rows, which I'd like to ignore completely and just focus on the data that is left.
Any help would be greatly appreciated.

Respuestas (2)

Ameer Hamza
Ameer Hamza el 8 de Mayo de 2018
Try readtable()
data = readtable(filename, 'HeaderLines', 12);
  2 comentarios
flemingtb
flemingtb el 8 de Mayo de 2018
Is readtable available in Matlab 2011?
Ameer Hamza
Ameer Hamza el 8 de Mayo de 2018
No, it was introduced in R2013b.

Iniciar sesión para comentar.


Fangjun Jiang
Fangjun Jiang el 8 de Mayo de 2018
Editada: Fangjun Jiang el 8 de Mayo de 2018
importdata(FILENAME, DELIM, NHEADERLINES) loads data from ASCII file FILENAME, reading numeric data starting from line NHEADERLINES+1.
  4 comentarios
flemingtb
flemingtb el 8 de Mayo de 2018
Editada: flemingtb el 8 de Mayo de 2018
StartOfDataAtLine 12
Version 1.02
Note: words that mean things]
Stored: Tue Jan 16 13:26:08 2018
Emissivity: 1.000
NumberOfLines: 702
NumberOfPixels: 476
LinesPerSecond: 76
InternalTemperature: 44°C
Stored unit: Temperature in d°C (°C * 10)
Orientation: row --> line
1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000
Fangjun Jiang
Fangjun Jiang el 8 de Mayo de 2018
all the numerical data are in one line. There is no carriage return. Please attach a text file.

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by