How to sum multiple rows elements within the matrix
Mostrar comentarios más antiguos
I have a matrix with (30*70 ).
Does anybody know how I can calculate the the average of every 3 rows together?
for example : rows from (1-3) to be 1 row and second row to be the average of (4-6) and so on .
the final matrix must be 10*70
Respuesta aceptada
Más respuestas (1)
Fangjun Jiang
el 13 de Mzo. de 2020
a=rand(6,7);
b=reshape(a,3,[]);
c=mean(b);
d=reshape(c,2,[]);
1 comentario
Abdulhakim Alezzi
el 13 de Mzo. de 2020
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!