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

2 次查看(过去 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 CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by