cumprod(cumprod(YourMatrix,2))
cumprod row and column
2 次查看(过去 30 天)
显示 更早的评论
Hi there, I have a matrix of size 1000x 40. The 1000 represent weeks and 40 represent the number of assets. For each entry is a percentage of money made or lost.
I want to do the cum prod horizontally (all assets for one week), then cumprod going doing. So I have a full return for all assets.
Any help would be appreciated.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!