Group: | Handling of time |
Topic: | Time as numerical output |
See also: | nyear nmonth ndayofmonth nhour nminute nsecond |
Function: | ndayofweek | |
Description: | returns the day of the week as a number (1-7, sunday-saturday) |
Usage: | tn = ndayofweek(t) | |
Input: | ||
t | n x 1 time vector | |
Output: | ||
tn | n x 1 array |
yr = 1970 +(1:10) t = settime(yr) ts = ndayofweek(t) ts
Contents of ts [ 1,] 6 [ 2,] 7 [ 3,] 2 [ 4,] 3 [ 5,] 4 [ 6,] 5 [ 7,] 7 [ 8,] 1 [ 9,] 2 [10,] 3