|MATLAB Function Reference|
Product of array elements
B = prod(A)
returns the products along different dimensions of an array.
A is a vector,
prod(A) returns the product of the elements.
A is a matrix,
prod(A) treats the columns of
A as vectors, returning a row vector of the products of each column.
A is a multidimensional array,
prod(A) treats the values along the first non-singleton dimension as vectors, returning an array of row vectors.
B = prod(A,dim)
takes the products along the dimension of
A specified by scalar
The magic square of order 3 is
The product of the elements in each column is
The product of the elements in each row can be obtained by: