Function that transforms years into days

 Respuesta aceptada

Akira Agata
Akira Agata el 23 de Feb. de 2018
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

Más respuestas (1)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by