MATLAB 도움말 센터
Determine if input is table or timetable
Since R2021b
tf = istabular(A)
tf = istabular(A) returns logical 1 (true) if A is either a table or a timetable, and logical 0 (false) otherwise.
tf
A
1
true
0
false
This syntax is equivalent to tf = istable(A) || istimetable(A), but is more convenient.
tf = istable(A) || istimetable(A)
collapse all
Create a table using the table function.
table
T = table([98;97.5;97.9;98.1;101],[120;111;119;117;118])
T=5×2 table Var1 Var2 ____ ____ 98 120 97.5 111 97.9 119 98.1 117 101 118
To confirm that T is either a table or a timetable, use the istabular function.
T
istabular
tf = istabular(T)
tf = logical 1
Now convert T to a timetable.
TT = table2timetable(T,RowTimes=seconds(1:5))
TT=5×2 timetable Time Var1 Var2 _____ ____ ____ 1 sec 98 120 2 sec 97.5 111 3 sec 97.9 119 4 sec 98.1 117 5 sec 101 118
The istabular function still returns 1 for TT.
TT
tf = istabular(TT)
However, the istable function returns 0 because TT is a timetable, not a table.
istable
tf = istable(TT)
tf = logical 0
Input array.
True or false result, returned as a 1 or 0 of data type logical.
logical
expand all
The istabular function fully supports tall arrays. For more information, see Tall Arrays.
Introduced in R2021b
table | timetable | iscell | isstruct | isnumeric | isobject | islogical | istable | istimetable
timetable
iscell
isstruct
isnumeric
isobject
islogical
istimetable
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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의