- `Y = prod (X)`
- `Y = prod (X, DIM)`

Product of elements along dimension `DIM`.

If `DIM` is omitted, it defaults to the first non-singleton dimension.

See also: `cumprod`, `sum`.

### References

- https://www.mathworks.com/help/matlab/ref/prod.html
- https://octave.sourceforge.io/octave/function/prod.html
- https://en.wikipedia.org/wiki/Multiplication#Product_of_a_sequence
