Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Handling of time
Topic: Time as numerical output
See also: nmonth ndayofmonth ndayofweek nhour nminute nsecond

Function: nyear
Description: returns the year as a four digit number (YYYY)

Usage: tn = nyear(t)
Input:
t n x 1 time vector
Output:
tn n x 1 array

Example:



yr = 1970 + (1:10)

t  = settime(yr)

tn = nyear(t)

tn

Result:



Contents of tn

[ 1,]     1971 

[ 2,]     1972 

[ 3,]     1973 

[ 4,]     1974 

[ 5,]     1975 

[ 6,]     1976 

[ 7,]     1977 

[ 8,]     1978 

[ 9,]     1979 

[10,]     1980 


Group: Handling of time
Topic: Time as numerical output
See also: nmonth ndayofmonth ndayofweek nhour nminute nsecond

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

(C) MD*TECH Method and Data Technologies, 21.9.2000