PROD PROD Product Function

Usage

Computes the product of an array along a given dimension.  The general
syntax for its use is

   y = prod(x,d)

where x is an n-dimensions array of numerical type.
The output is of the same numerical type as the input, except 
for integer types, which are automatically promoted to int32.
 The argument d is optional, and denotes the dimension along 
which to take the product.  The output is computed via
If d is omitted, then the product is taken along the 
first non-singleton dimension of x. Note that by definition
(starting with FreeMat 2.1) prod([]) = 1.
