MATLAB Answers

i want to sum each row of a matrix to the next row of the same matrix and save it in a new variable. its a part of big algorithm.

2 views (last 30 days)
Sheharyar Mr
Sheharyar Mr on 23 Jan 2020
Commented: Walter Roberson on 23 Jan 2020
let the matrix is this
A= [1 2 3 4; 5 6 7 8; 4 3 2 1];
and i want to get this
X=[1 2 3 4; 6 8 10 12; 10 11 12 13];
thanks in advance...

  0 Comments

Sign in to comment.

Answers (2)


Community Treasure Hunt

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

Start Hunting!

Translated by