width
Number of table variables
📝Syntax
W = width(T)
📥Input Arguments
Parameter Description
T Input array (table or other).
📤Output Arguments
Parameter Description
W a integer value: Number of Variables in Table or size(T, 2).
📄Description

W = width(T) returns the number of variables in the table T.

The function width(T) is equivalent to size(T, 2), which also provides the number of columns in the table.

💡Examples
T = table();
width(T)
C = {'John', 28, true; 'Alice', 35, false; 'Bob', 42, true};
T = cell2table(C);
width(T)
🔗See Also
heightsizetable
🕔Version History
Version Description
1.8.0 initial version
Edit this page on GitHub