Help me with a function.

2 ビュー (過去 30 日間)
Aniruddha Das
Aniruddha Das 2020 年 6 月 6 日
回答済み: the cyclist 2020 年 6 月 6 日
I want to get a row matrix A from a parent row matrix B, where, the each component of A are the sequential sum of the components of B.
For e.g if B = [1 5 14 7 3] then A should be [1 6 20 27 30]
Please help.

採用された回答

the cyclist
the cyclist 2020 年 6 月 6 日
A = cumsum(B);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by