about addtodate function using?

1 回表示 (過去 30 日間)
Roger
Roger 2014 年 6 月 30 日
回答済み: Star Strider 2014 年 6 月 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 Center および File ExchangeReport Generator Utilities についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by