weeknum

Returns the week number(s) corresponding to a vector of serial date numbers.

Vous suivez désormais cette soumission

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.

Citation pour cette source

Hallvard (2026). weeknum (https://fr.mathworks.com/matlabcentral/fileexchange/22663-weeknum), MATLAB Central File Exchange. Extrait(e) le .

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.0.0.0