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

1 回表示 (過去 30 日間)
Benedikt Wessel
Benedikt Wessel 2018 年 9 月 18 日
コメント済み: Benedikt Wessel 2018 年 9 月 18 日
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.
Benedikt Wessel
Benedikt Wessel 2018 年 9 月 18 日
Thanks guys, Matlab is quite new to me.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by