DADiSP Worksheet Functions > Function Categories > Statistics and Calculus > COLLENGTH
Produces a row of the lengths of each column of the input table.
COLLENGTH(a, unravel)
a |
- |
A series or multi-column table. |
||||
unravel |
- |
Optional. An integer indicating if "unraveled" (i.e. sequential) lengths should be returned:
|
A one-row table with the same number of columns as the input table.
a = ravel({1, 2, 6, 4, 5}, {1, 3})
b = collength(a)
a == {{1, 1},
{2, 3},
6,
4,
5}
b == {{5, 2}}
c = collength(a, 1)
d = a[c]
c == {{5, 7}}
d == {{5, 3}}
COLLENGTH(a, 1) returns the lengths in sequential, unraveled order equivalent to a running total of the column lengths. This form is useful in array reference expressions.
COLLENGTH can be abbreviated as COLLEN.