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