Row-oriented text file

2 次查看(过去 30 天)
IE
IE 2019-7-10
回答: IE 2019-7-10
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 个评论
Guillaume
Guillaume 2019-7-10
Can you attach an example text file?
IE
IE 2019-7-10
The original file is .dat but otherwise this is the same.

请先登录,再进行评论。

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Text Data Preparation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by