The TOTAL function returns the sum of the elements of Array . The sum of the array elements over a given dimension is returned if the Dimension argument is present.
The array to be summed. This array can be of any basic type except string. If Array is double-precision floating-point, complex, or double-precision complex, the result is of the same type. Otherwise, the result is single-precision floating-point.
The dimension over which to sum, starting at one. If this argument is not present or zero, the scalar sum of all the array elements is returned. If this argument is present, the result is an array with one less dimension than Array . For example, if the dimensions of Array are N 1 , N 2 , N 3 , and Dimension is 2, the dimensions of the result are ( N 1 , N 3 ), and element (i,j) of the result contains the sum:
Set this keyword to cause the routine to check for occurrences of the IEEE floating-point value NaN in the input data. Elements with the value NaN are treated as missing data. (See Special Floating-Point Values for more information on IEEE floating-point values.)