Clear Filters
Clear Filters

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

1 view (last 30 days)
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.

Accepted Answer

Walter Roberson
Walter Roberson on 18 Sep 2018
cumsum()
  2 Comments
Stephen23
Stephen23 on 18 Sep 2018
Edited: Stephen23 on 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.

Sign in to comment.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!