DocumentationHelp Center
Determine whether input is table
TF = istable(T)
example
TF = istable(T)returns logical1(true) ifTis a table, and logical0(false) otherwise.
T
1
true
0
false
collapse all
Create a workspace variable,T.
T = table(categorical({'M';'F';'M'}),[45 45;41 32;40 34],...{'NY';'CA';'MA'},[true;false;false])
T=3×4 tableVar1 Var2 Var3 Var4 ____ ________ ______ _____ M 45 45 {'NY'} true F 41 32 {'CA'} false M 40 34 {'MA'} false
Verify that the workspace variable,T, is a table.
istable(T)
ans =logical1
Tis a table.
Create a table,T.
Determine if the subset of tableTthat contains only the second and fourth variables is a table.
istable(T{:,[2 4]})
ans =logical0
Conversely, accessing data with curly braces,T{:,[2 4]}, returns a matrix and not a table.
T{:,[2 4]}
Input variable, specified as a workspace variable.Tcan be any data type.
This function fully supports distributed arrays. For more information, seeRun MATLAB Functions with Distributed Arrays(Parallel Computing Toolbox).
iscell|islogical|isnumeric|isobject|isstruct|table
iscell
islogical
isnumeric
isobject
isstruct
table
A modified version of this example exists on your system. Do you want to open this version instead?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office
Get trial now