Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

iscalendarduration

Determine if input is calendar duration array

Syntax

tf = iscalendarduration(t)

Description

example

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

Examples

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
   1

Input Arguments

collapse all

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

Introduced in R2014b

Was this topic helpful?