Day of Year to MATLAB date

Versión 1.1.0.0 (1,68 KB) por Ashley
Converts a day of year number and a year to a date in MATLAB format
3,8K descargas
Actualizado 22 may 2009

Ver licencia

DOY2DATE.m will convert a vector of day of year numbers and years
and convert them to MATLAB date format.

Sample Call:
doyV = [54;200.4315];
yearV = [2009;2009];
[dateV] = doy2date(doyV,yearV);

Inputs:
doyV -> vector of day of year numbers (n x 1)
yearV -> vector of years (n x 1)

Outputs:
dateV -> vector of MATLAB dates (n x 1)

function [dateV] = doy2date(doyV,yearV)
z = zeros(length(yearV),5);
dv = horzcat(yearV,z);
dateV = doyV + datenum(dv);

Citar como

Ashley (2024). Day of Year to MATLAB date (https://www.mathworks.com/matlabcentral/fileexchange/24235-day-of-year-to-matlab-date), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2007a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Dates and Time en Help Center y MATLAB Answers.
Agradecimientos

Inspirado por: Date to Decimal Day of Year

Inspiración para: Average Temperature, F10.7 Solar Flux & Ap Indices

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

fixed typo in title

1.0.0.0