istable
Tests whether a value is a table.
Category: Language Fundamentals > Data Types
Syntax
tf = istable(A)
Returns true if A is a table.
Description
Only the table class gives true. A timetable is a different class, so istable(timetable(...)) is false; use istabular to accept both.
Input arguments
A- Any value.
Output arguments
tf- Logical scalar.
Example
Table or not
T = table([1;2], {'a';'b'});
istable(T)
istable(T.Var1)
istable(struct())
Output
ans = logical
1
ans = logical
0
ans = logical
0