istabular

Tests whether a value is a table or a timetable.

Category: Language Fundamentals > Data Types

Syntax

tf = istabular(A)

Returns true if A is a table or a timetable.

Description

Both containers share much of their interface: variables in columns, row selection, height and width. istabular lets code accept either, where istable would reject a timetable.

Input arguments

A
Any value.

Output arguments

tf
Logical scalar.

Example

Table and timetable

T = table([1;2]);
TT = timetable(seconds([0;1]), [1;2]);
istabular(T)
istabular(TT)
istabular([1 2])
Output
ans = logical
   1
ans = logical
   1
ans = logical
   0

See also

istable istimetable table timetable