Please find the attachment.

댓글 수: 3

jonas
jonas 2018년 10월 23일
The data is already tabular, so just use readtable instead.
KSSV
KSSV 2018년 10월 23일
jonas why the possible answer is in comment?
jonas
jonas 2018년 10월 23일
편집: jonas 2018년 10월 23일
Apart from the low effort put into my comment, I did not feel that it addressed the actual question, which seems to be specifically about textscan. I made the post shortly after the question was posted, so I was hoping for a quick reply after which I could expand my comment into an actual answer. Perhaps I should have phrased my comment in a different way.

댓글을 달려면 로그인하십시오.

 채택된 답변

jonas
jonas 2018년 10월 23일
편집: jonas 2018년 10월 23일

1 개 추천

You can use readtable since the data is tabular.
T = readtable('AE33_AE33-S02-00184_20170102.dat','headerlines',8)
...gave me a 71 column table. Some of your headers are not valid variable names so I did not import them at all.
If you insist on using textscan, then
fid = fopen('AE33_AE33-S02-00184_20170102.dat')
out = textscan(fid,['%{yyyy/MM/dd}D %{hh:mm:ss}T',repmat('%f',1,69)],'headerlines',9)
fclose(fid)

댓글 수: 1

in reply to Vishu's "Answer"
Odd. I suspect you are using an ancient release that cannot parse the duration format? You can always import the dates as strings. Try this:
fid = fopen('AE33_AE33-S02-00184_20170102.dat')
out = textscan(fid,['%s%s',repmat('%f',1,69)],'headerlines',9)
fclose(fid)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

질문:

2018년 10월 23일

댓글:

2018년 10월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by