Effacer les filtres
Effacer les filtres

Row-oriented text file

2 vues (au cours des 30 derniers jours)
IE
IE le 10 Juil 2019
Réponse apportée : IE le 10 Juil 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 commentaires
Guillaume
Guillaume le 10 Juil 2019
Can you attach an example text file?
IE
IE le 10 Juil 2019
The original file is .dat but otherwise this is the same.

Connectez-vous pour commenter.

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Text Data Preparation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by