This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Determine if input is calendar duration array


tf = iscalendarduration(t)



tf = iscalendarduration(t) returns logical 1 (true) if t is a calendarDuration array. Otherwise, it returns logical 0 (false).


collapse all

Determine if the output of an arithmetic calculation is a calendarDuration array.

Add two calendarDuration arrays.

d1 = calyears(1:4);
d2 = caldays(1:4);
d = d1 + d2
d = 1x4 calendarDuration array
   1y 1d   2y 2d   3y 3d   4y 4d

Determine if the output is a calendarDuration array.

tf = iscalendarduration(d)
tf = logical

Input Arguments

collapse all

Input array, specified as a scalar, vector, matrix, or multidimensional array. t can be any data type.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2014b