sum(a)

Returns the sum of the values stored in array a.

sum(A)

Returns an array with the sums of each columns of matrix A.


See also min max range 


Example


a = ( 1, 2, 3, 4 );

sum( a )

10