| Group: | Matrix Manipulation |
| Topic: | Sorting and Counting |
| See also: | cumprod cumsum sum |
| Function: | prod | |
| Description: | prod computes the product of the elements of an array regarding a given dimension. |
| Usage: | z = prod (x {,j}) | |
| Input: | ||
| x | d1 x d2 x .. x dn array | |
| j | integer (number of dimension, default = 1) | |
| Output: | ||
| z | d1 x d2 x .. x d(j-1) x 1 x d(j+1) x .. x dn array | |
x = #(1, 2)~#(3, 4)~#(5, 6) prod (x,2)
Contents of prod [1,] 15 [2,] 48
| Group: | Matrix Manipulation |
| Topic: | Sorting and Counting |
| See also: | cumprod cumsum sum |