필터 지우기
필터 지우기

Why do i get rid of this error using cumsum saying 'dimension argument must be positive integer scalar within indexing range?

조회 수: 2 (최근 30일)
I am trying to get the cumulative return of four trading strategies using cum sum and it is giving me the error in the screen shot, how do i get rid of it?
Thanks
  댓글 수: 1
Stephen23
Stephen23 2017년 10월 26일
편집: Stephen23 2017년 10월 26일
The cumsum help shows that the data is always an array supplied as the first argument to cumsum. What do you expect to happen when you supply cumsum with four separate array input arguments?

댓글을 달려면 로그인하십시오.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2017년 10월 26일
편집: Andrei Bobrov 2017년 10월 26일
May be so?
cumu_ret_is= cumsum([d_pretbm_is,d_pretl_is,d_pret2_is,d_pret3_is])

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by