converting column of datetimes in excel to datenumbers in matlab
3 次查看(过去 30 天)
显示 更早的评论
hie everyone
I want to convert data in column C (labeled datetime) of the attached document to a column of date numbers in matlab, which are to be used as input variables for a neural network
please help
0 个评论
采纳的回答
Mehmed Saad
2020-7-13
编辑:Mehmed Saad
2020-7-13
T = readtable('zetdctestdata.xlsx');
T.datetime = cellfun(@(x)datenum(x,'mm/dd/yyyy HH:MM:SS'),T.datetime);
5 个评论
Mehmed Saad
2020-7-15
编辑:Mehmed Saad
2020-7-15
Actual value in variable is 737076.458333333 but due to format it is rounding off
The default format for command window is Short
T.datetime(1)
ans =
7.3708e+05
Change Format to long
format Long
T.datetime(1)
ans =
7.370764583333334e+05
But it is just for display purpose
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!