weeknum
Version 1.0.0.0 (816 Bytes) by
Hallvard
Returns the week number(s) corresponding to a vector of serial date numbers.
2K Downloads
Updated
12 Jan 2009
No License
w = weeknum(daynums)
WEEKNUM returns vector W containing the week numbers corresponding to the dates in input vector DAYNUMS of serial date numbers.
Week 1 is the first 4-day week of the year
NB! Using Monday as first day of the week.
Quick and dirty code. No error checking. Use with caution.
Cite As
Hallvard (2024). weeknum (https://www.mathworks.com/matlabcentral/fileexchange/22663-weeknum), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2008b
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 |