Sum of elements along dimension dim. If dim is omitted, it defaults to 1 (column-wise sum).
As a special case, if x is a vector and dim is omitted, return the sum of the elements.
If the optional argument 'native' is given, then the sum is performed in the same type as the original argument, rather than in the default double type. For example
sum ([true, true]) 2 sum ([true, true], 'native') true