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

1 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2018-9-18
cumsum()
  2 个评论
Stephen23
Stephen23 2018-9-18
编辑:Stephen23 2018-9-18
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by