istable - Determine if input is table - MATLAB (original) (raw)
Main Content
Determine if input is table
Syntax
Description
tf = istable([A](#btydocu-1-T))
returns logical 1
(true
) if A
is a table, and logical0
(false
) otherwise.
Examples
Create a table, T
.
T = table(categorical(["M";"F";"M"]),[45 45;41 32;40 34],... ["NY";"CA";"MA"],[true;false;false])
T=3×4 table Var1 Var2 Var3 Var4 ____ ________ ____ _____
M 45 45 "NY" true
F 41 32 "CA" false
M 40 34 "MA" false
Verify that T
is a table.
Create a table, T
.
T = table(categorical(["M";"F";"M"]),[45 45;41 32;40 34],... ["NY";"CA";"MA"],[true;false;false])
T=3×4 table Var1 Var2 Var3 Var4 ____ ________ ____ _____
M 45 45 "NY" true
F 41 32 "CA" false
M 40 34 "MA" false
Extract the second and fourth variables from T
. When you index into a table using smooth parentheses, the result is a table.
T2=3×2 table Var2 Var4 ________ _____
45 45 true
41 32 false
40 34 false
Extract data from the second and fourth variables. When you index into a table using curly braces, the result is a matrix, not a table.
A = 3×3
45 45 1
41 32 0
40 34 0
Input Arguments
Extended Capabilities
Version History
Introduced in R2013b