Function that transforms years into days

 採用された回答

Akira Agata
Akira Agata 2018 年 2 月 23 日

0 投票

Like this?
function numDay = year2days(year)
numDay = days(datetime(year,12,31)-datetime(year,1,1))+1;
end
The following is one example:
>> year2days(2000)
ans =
366

その他の回答 (1 件)

Nurul Asyikin Zakaria
Nurul Asyikin Zakaria 2018 年 2 月 27 日

0 投票

Thank you for the guide :)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by