Day of year
Version 1.0.0.0 (1.02 KB) by
Daniel Okoh
A function that computes the day number (or day of year) for any given date, Enhanced.
To use the function, simply download it to your working directory, then call the function 'doy' supplying the date vector.
Example:
doy('02-Jun-2003')
returns 153 as the day number for 2-Jun-2003.
Note that the date vector can be in any format as recognized by MATLAB's DATEVEC. You can also convert a group of dates at once.
Enjoy!
Cite As
Daniel Okoh (2023). Day of year (https://www.mathworks.com/matlabcentral/fileexchange/38162-day-of-year), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2010a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Dates and Time in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |