Filter löschen
Filter löschen

Row-oriented text file

9 Ansichten (letzte 30 Tage)
IE
IE am 10 Jul. 2019
Beantwortet: IE am 10 Jul. 2019
What's a good way to import a row oriented text file? All of the import methods I know of produce a character array that would require manually searching through to find variable names. The file I'm trying to import looks a bit like the following:
First Name: Name
Last Name: Name
Age: Age
...
and so on. I'm trying to extract the first name, last name, age, and a couple of other variables from it.
  2 Kommentare
Guillaume
Guillaume am 10 Jul. 2019
Can you attach an example text file?
IE
IE am 10 Jul. 2019
The original file is .dat but otherwise this is the same.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

IE
IE am 10 Jul. 2019
Figured out the answer to my own question. Can be solved by importing as
readtable(fileName,'ReadRowNames',1)

Weitere Antworten (0)

Kategorien

Mehr zu Text Data Preparation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by