Info

此问题已关闭。 请重新打开它进行编辑或回答。

why datestr did not give reasonable output?

1 次查看(过去 30 天)
huda nawaf
huda nawaf 2012-11-26
关闭: MATLAB Answer Bot 2021-8-20
hi, The range of my data is 2005 to Ontober 2007. when I extracted min and max, I got
709277 and 733325 why when use this function datestr(733325)
I will get : 10-Oct-2007
it is ok . and when use
datestr(709277)
ans =
07-Dec-1941
Thanks in advance
  11 个评论
Walter Roberson
Walter Roberson 2012-12-2
I am not clear: are you saying that there is a date of 07-Dec-1941 in the original file? If so then there is no problem, datestr() is just responding correctly for the data.
If there was no 07-Dec-1941 in the original file, then we will need to know how you converted the dates.
huda nawaf
huda nawaf 2012-12-2
Yes the datestr is working correctly. I were thinking there is somthing error, because it is supposed that earliest time in this dataset in 2005. Now, I'm sure there is error in published data.
Thanks

回答(1 个)

Jan
Jan 2012-11-26
The answer 07-Dec-1941 is not only reasonable, but also correct. It is 24048 days before the 10-Oct-2007, as the serial date format implies.

标签

Community Treasure Hunt

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

Start Hunting!

Translated by