calmonths
Calendar duration in months
Syntax
Description
M = calmonths(
returns
an array representing calendar months equivalent to the values in X
)X
.
If
X
is a numeric array, thenM
is acalendarDuration
array with each element equal to the number of calendar months in the corresponding element ofX
.If
X
is acalendarDuration
array, thenM
is adouble
array with each element equal to the number of whole calendar months in the corresponding element ofX
.
The calmonths
function creates months that can account for the
differing lengths of calendar months when used in calendar calculations.
Examples
Input Arguments
Extended Capabilities
Version History
Introduced in R2014b