Mostrar comentarios más antiguos
行の隣り合った要素を足して新たな行列を作りたいです。
例えば、
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を作りたいです。
よろしくお願いいたします。
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!