Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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 comentario
Stephen23
Stephen23 el 26 de Oct. de 2017
Editada: Stephen23 el 26 de Oct. de 2017
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?

Iniciar sesión para comentar.

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 26 de Oct. de 2017
Editada: Andrei Bobrov el 26 de Oct. de 2017
May be so?
cumu_ret_is= cumsum([d_pretbm_is,d_pretl_is,d_pret2_is,d_pret3_is])

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by