Contents Previous Next Subchapters

Computing The Sum Of Each Column
Syntax colsum(x)
See Also sum , colrange , colmean , colstd , colmad , colmse

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.

     x = [{0., 2., 4.}, {0., -1., 1.}]
     [ 6 , 0 ]