Description
If x is an integer, real, double-precision, or complex matrix,
returns a row vector with the same type and column dimension as
x containing the sum of each column.
If x is a logical matrix,
returns an integer row vector
(with the same column dimension as x)
containing the number of "true" entries in each column.
Example
x = [{0., 2., 4.}, {0., -1., 1.}]
colsum(x)
returns
[ 6 , 0 ]