about addtodate function using?

1 次查看(过去 30 天)
datevec(addtodate(datenum(['1/1/2008']),102,'day'))
ans=
2008 4 12 0 0
datevec(addtodate(datenum(['1/1/2008']),103,'day'))
ans=
2008 4 12 23 0
the second ans , why not 2008 4 13 0 0 ??

采纳的回答

Star Strider
Star Strider 2014-6-30
The addtodate function has some glitches, some of which may be version specific. I cannot reproduce your error in R2014a using the commands you posted.
I get:
ans =
2008 4 12 0 0 0
ans =
2008 4 13 0 0 0

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Argument Definitions 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by