PROD 連乘函數, 階乘可用
For vectors, PROD(X) is the product of the elements of X. For
matrices, PROD(X) is a row vector with the product over each
column. For N-D arrays, PROD(X) operates on the first
PROD(X,DIM) works along the dimension DIM.
Example: If X = [0 1 2
3 4 5]
then prod(X,1) is [0 4 10] and prod(X,2) is [ 0