在matlab中导入xlsx时间 [英] import xlsx time in matlab
问题描述
我有一个xlsx文档,其中第一列代表一个时间序列:
I have a xlsx document in which the first column represents a time series:
2009-11-04 11:35:00.000
2009-11-04 11:35:00.000
2009-11-04 11:36:00.000
2009-11-04 11:36:00.000
2009-11-04 11:37:00.000
2009-11-04 11:37:00.000
2009-11-04 11:38:00.000
2009-11-04 11:38:00.000
当我使用以下功能在matlab中读取xlsx文件时:
when I read the xlsx file in matlab using the function:
[〜,〜,data] = xlsread(filename,1);
[~,~,data] = xlsread(filename,1);
我得到的是:
40121.4826388889
40121.4826388889
40121.4833333333
40121.4833333333
40121.4840277778
40121.4840277778
40121.4847222222
40121.4847222222
是哪种格式?我该如何找回时间?
Which format is it? How can I get the time back?
非常感谢!
推荐答案
使用在MATLAB中表示日期和时间.但是,Excel具有与MATLAB不同的日期表示形式,请参见
Use the datestr
function. For more information on dates and times in MATLAB, see Represent Dates and Times in MATLAB. Excel, however, has a different representation of dates from MATLAB, see When to Convert Dates from Excel Files for more information.
这篇关于在matlab中导入xlsx时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!