I needed matlab code for cumulative sum of column vector

1 visualización (últimos 30 días)
maha ismail
maha ismail el 27 de Dic. de 2014
Editada: Azzi Abdelmalek el 27 de Dic. de 2014
I needed matlab code for cumulative sum of column vector

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 27 de Dic. de 2014
Editada: Azzi Abdelmalek el 27 de Dic. de 2014
yourarray=[1 2 3 4 5]
out=cumsum(yourarray)
  5 comentarios
maha ismail
maha ismail el 27 de Dic. de 2014
it doesn't work as I need I need to produce I column vector also not a scalar because I need cumulative sum for more colmun vector such that each row element of new column vector coming from current and previous element row of vectors
Azzi Abdelmalek
Azzi Abdelmalek el 27 de Dic. de 2014
Editada: Azzi Abdelmalek el 27 de Dic. de 2014
Maybe you need this
yourarray=[1 2 3;4 5 6]
out=cumsum(yourarray,1)
%or
yourarray=[1 2 3;4 5 6]
out=cumsum(yourarray,2)

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with MATLAB 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