sum
Sum of fi array elements
Description
returns the
sum along different dimensions of the S = sum(A)fi array
A.
If
Ais a vector,sum(returns the sum of the elements.A)If
Ais a matrix,sum(treats the columns ofA)Aas vectors, returning a row vector of the sums of each column.If
Ais a multidimensional array,sum(treats the values along the first non-singleton dimension as vectors, returning an array of row vectors.A)
Examples
Input Arguments
Output Arguments
Limitations
sumdoes not supportfiobjects of data typeBoolean.
Extended Capabilities
Version History
Introduced before R2006a