How do I read in an Excel Spreadsheet with these types of numbers?

조회 수: 1 (최근 30일)
I need to read in an excel spreadsheet:
xlsread('fileID');
Each row of the spreadsheet looks like this:
1 49:33.2 10:49:32 0.20645 0.14044
Once read in it is displayed like this:
1 0.2844 0.451 0.20645 0.14044
How can I get it to read in columns two and three the way it appears in excel?

채택된 답변

John Petersen
John Petersen 2013년 5월 22일
I get a different answer
1.0000 0.0344 0.4511 0.2064 0.1404
What matlab appears to be doing is interpreting the columns with colons as time with units in number of days. The first number 49:33 is interpreted as 49min 33s and converts to about 0.0344days The second time 10hrs, 49min, 32 sec, is about 0.45days. You'll just have to convert them back to time format in matlab.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by