Skip to content

width

table · scripts/table/width.m

: w = width (tbl)

Return the number of columns in table tbl.

width(tbl) returns the number of columns (variables) in the table, which is equivalent to size(tbl, 2).

tbl = table([1; 2; 3], [4; 5; 6], 'VariableNames', {'A', 'B'});
w = width(tbl)
⇒ w = 2