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.

istimetable

Determine if input is timetable

Syntax

TF = istimetable(A)

Description

example

TF = istimetable(A) returns logical 1 (true) if A is a timetable, and logical 0 (false) otherwise.

Examples

collapse all

Create a timetable and verify that it is a timetable.

Date = datetime({'2015-12-18';'2015-12-19';'2015-12-20'});
Temp = [37.3;39.1;42.3];
Pressure = [29.4;29.6;30.0];
Precip = [0.1;0.9;0.0];
TT = timetable(Date,Temp,Pressure,Precip)
TT=3x3 timetable null
        Date       Temp    Pressure    Precip
    ___________    ____    ________    ______

    18-Dec-2015    37.3    29.4        0.1   
    19-Dec-2015    39.1    29.6        0.9   
    20-Dec-2015    42.3      30          0   

TF = istimetable(TT)
TF = logical
   1

Convert TT to a table, T. The istimetable function returns 0 because T is not a timetable.

T = timetable2table(TT);
TF = istimetable(T)
TF = logical
   0

Input Arguments

collapse all

Input variable, specified as a workspace variable. A can be any data type.

Introduced in R2016b

Was this topic helpful?