Difference between revisions of "CumProduct"
Line 7: | Line 7: | ||
= Examples = | = Examples = | ||
+ | |||
+ | {| border="1" | ||
+ | ! I → | ||
+ | | 1 || 2 || 3 || 4 || 5 || 6 || 7 | ||
+ | |- | ||
+ | ! X → | ||
+ | | 8 || 2 || 1 || 5 || -3 || 0 || 4 | ||
+ | |- | ||
+ | ! [[Cumulate]](X,I) → | ||
+ | | 8 || 16 || 16 || 80 || -240 || 0 || 0 | ||
+ | |} | ||
= Library = | = Library = |
Revision as of 07:52, 7 August 2008
CumProduct(x,I)
Returns an array with each element being the product of all of the elements of X along dimension I up to, and including, the corresponding element of X.
Examples
I → | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
X → | 8 | 2 | 1 | 5 | -3 | 0 | 4 |
Cumulate(X,I) → | 8 | 16 | 16 | 80 | -240 | 0 | 0 |
Library
Array functions
See Also
Comments
Enable comment auto-refresher