How to obtain a set of matrix from another matrix by adding the previous row value along the column to the next row on the same column

1 回表示 (過去 30 日間)
Example
a= 2,4;3,4;2 1
the new matrix will be
b= 2,4;3+2,4+4;2+3+2,1+4+4
along the colums

採用された回答

per isakson
per isakson 2017 年 10 月 24 日
Is this what you want?
>> cumsum( a, 1 )
ans =
2 4
5 8
7 9

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by