converting column of datetimes in excel to datenumbers in matlab

조회 수: 4(최근 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

채택된 답변

Mehmed Saad
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
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
ans =
Change Format to long
format Long
ans =
But it is just for display purpose

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by