MATLAB Function Reference |
Syntax
E = eomday(Y,M)
Description
E = eomday(Y,M)
以陣列 Y
和 M
為年份和月份,計算當月的天數。
Examples
因為 1996 年是閏年,所以 eomday(1996,2)
這個敘述會傳回 29
。
y = 1900:1999; E = eomday(y,2*ones(length(y),1)'); y(find(E==29))' ans = Columns 1 through 6 1904 1908 1912 1916 1920 1924 Columns 7 through 12 1928 1932 1936 1940 1944 1948 Columns 13 through 18 1952 1956 1960 1964 1968 1972 Columns 19 through 24 1976 1980 1984 1988 1992 1996
See Also
end | eps |