table.iscolumn
table: TF = iscolumn (tbl)
Test input table for being a column vector.
TF = iscolumn (tbl) returns true if the input
table tbl has a single variable. The number of columns within that
variable does not matter.
Source Code: table
A table is a column when it has a single variable — regardless of how many columns that variable spans internally.
T1 = table ([1; 2; 3], 'VariableNames', {'x'})
T1 =
3x1 table
x
_
1
2
3
iscolumn (T1)
ans = 1
The lone variable may itself be multi-column; the table is still a column.
T2 = table ([1 2; 3 4; 5 6], 'VariableNames', {'xy'})
T2 =
3x1 table
xy
______
1 2
3 4
5 6
iscolumn (T2)
ans = 1
Two or more variables make it no longer a column.
iscolumn (table ([1; 2; 3], [4; 5; 6]))
ans = 0