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?
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!