David
Farruggio

MathGenie

prod

Product of array elements

Syntax and Description

prod(A) returns the product of the array elements of A.
  • If A is a vector, then prod(A) returns the product of the elements.
  • If A is a matrix, then prod(A) treats the columns of A as vectors and returns a row vector of the products of each column.
prod(A,dim) returns the products along dimension dim. For example, if A is a matrix, prod(A,2) is a column vector containing the products of each row.

Back to functions