Function that transforms years into days

 采纳的回答

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

类别

帮助中心File Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by