This is the first time importing an excel file in matlab. Here the problem:
I have used the following code to read the excel file in matlab
[num,txt,raw] = xlsread('filename.xls');
Now, time has been imported in the form of serial numbers (I guess)
I wuold like to convert time into string in order to have time as expressed in the excel file, so in this format:
So far, I tried doing this, but something went wrong..
dd = datetime(time, 'ConvertFrom','datenum');
Also, following another code that I used in the past (that was working), I got an error:
tref = datenum ('1950-01-01 00.00.00');
time_greg = (time./24)+tref;
Array indices must be positive integers or logical values.
Error in formatdate (line 161)
month = char(strrep(month(dtvector(:,2)), '.', ''));
Error in dateformverify (line 32)
S = char(formatdate([y,mo,d,h,minute,s],dateformstr,islocal));
Error in datestr (line 200)
S = dateformverify(dtnumber, dateformstr, islocal);
Error in untitled (line 7)
Thank you a lot for your precious help!