thinking
Tuesday, 27 May 2014
CUMPROD (Cumulative product of elements) 例子
Example:
if X=[0 1 2;3 4 5]
then cumprod(X,1) is
[0 1 2; 0 4 10]
沿着列的方向累积连乘 (对第一个长度不为1的维度进行计算)
所以第一行,保持不变,第二行的元素变成他本身与对应的第一行元素的乘积
cumprod(X,2) 沿着行方向
所以结果为[0 0 0;3 12 60]
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment