cumprod row and column

조회 수: 2 (최근 30일)
Mate 2u
Mate 2u 2012년 6월 6일
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.

채택된 답변

Walter Roberson
Walter Roberson 2012년 6월 6일
cumprod(cumprod(YourMatrix,2))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by