Next: Special Functions, Previous: Trigonometry, Up: Arithmetic

— Built-in Function: **sum** (`x, dim`)

Sum of elements along dimension

dim. Ifdimis omitted, it defaults to 1 (column-wise sum).As a special case, if

xis a vector anddimis omitted, return the sum of the elements.

— Built-in Function: **prod** (`x, dim`)

Product of elements along dimension

dim. Ifdimis omitted, it defaults to 1 (column-wise products).As a special case, if

xis a vector anddimis omitted, return the product of the elements.

— Built-in Function: **cumsum** (`x, dim`)

Cumulative sum of elements along dimension

dim. Ifdimis omitted, it defaults to 1 (column-wise cumulative sums).As a special case, if

xis a vector anddimis omitted, return the cumulative sum of the elements as a vector with the same orientation asx.

— Built-in Function: **cumprod** (`x, dim`)

Cumulative product of elements along dimension

dim. Ifdimis omitted, it defaults to 1 (column-wise cumulative products).As a special case, if

xis a vector anddimis omitted, return the cumulative product of the elements as a vector with the same orientation asx.

— Built-in Function: **sumsq** (`x, dim`)

Sum of squares of elements along dimension

dim. Ifdimis omitted, it defaults to 1 (column-wise sum of squares).As a special case, if

xis a vector anddimis omitted, return the sum of squares of the elements.This function is conceptually equivalent to computing

sum (x .* conj (x), dim)but it uses less memory and avoids calling conj if

xis real.