Filter löschen
Filter löschen

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 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

per isakson
per isakson am 24 Okt. 2017
Is this what you want?
>> cumsum( a, 1 )
ans =
2 4
5 8
7 9

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by