Navigation

Operators and Keywords

Function List:

C++ API

: [count, mean, var] = spstats (S)
: [count, mean, var] = spstats (S, j)

Return the stats for the nonzero elements of the sparse matrix S.

count is the number of nonzeros in each column, mean is the mean of the nonzeros in each column, and var is the variance of the nonzeros in each column.

Called with two input arguments, if S is the data and j is the bin number for the data, compute the stats for each bin. In this case, bins can contain data values of zero, whereas with spstats (S) the zeros may disappear.

Package: octave