Product of elements.
P = prod(A)
Ais a scalar,
Pis equal to
- Otherwise, each element of
Pis the product of all elements of the corresponding vector of
Aalong the first non-singleton dimension.
P = prod(A, k)
- This is the same as the previous cases, except that each element of
Pcorresponds to a vector of A along its
kshould be less than or equal to the number of dimensions of
When multiplying two numbers by
prod, if any one of them is
NaN, the result will be