Borrar filtros
Borrar filtros

Can movsum be modified a way, so that it will gain the following output:

1 visualización (últimos 30 días)
A=[1,2,3,4,5,6,7,8,9] B=movsum(A,?) B=[1,3,6,10,15,21,28,36,45] My aim is to build a sum along the vector; adding a value to the previous sum. Thanks for helping.

Respuesta aceptada

Walter Roberson
Walter Roberson el 18 de Sept. de 2018
cumsum()
  2 comentarios
Stephen23
Stephen23 el 18 de Sept. de 2018
Editada: Stephen23 el 18 de Sept. de 2018
Note that cumsum is the very first function listed in movsum's "See Also" list, so it is quite easy to find, even starting from just knowing movsum.
Benedikt Wessel
Benedikt Wessel el 18 de Sept. de 2018
Thanks guys, Matlab is quite new to me.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by