Show older comments
行の隣り合った要素を足して新たな行列を作りたいです。
例えば、
A=[1 2 3 4; 5 6 7 8; 9 10 11 12]
という3×4の行列があるとすると、
B=[1+2 2+3 3+4; 5+6 6+7 7+8; 9+10 10+11 11+12]
=[3 5 7; 11 13 15; 19 21 23]
という行列3×3のBを作りたいです。
よろしくお願いいたします。
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!