Function prod

Compute the product of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated.

Syntax

prod(a, b, c, ...)
prod(A)

Parameters

Parameter Type Description
args ... * A single matrix or or multiple scalar values

Returns

Type Description
* The product of all values

Examples

multiply(2, 3);           // returns 6
prod(2, 3);               // returns 6
prod(2, 3, 4);            // returns 24
prod([2, 3, 4]);          // returns 24
prod([[2, 5], [4, 3]]);   // returns 120

See also

mean, median, min, max, sum, std, var