Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 18 Sep. 2018
cumsum()
  2 Kommentare
Stephen23
Stephen23 am 18 Sep. 2018
Bearbeitet: Stephen23 am 18 Sep. 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by