How to sum multiple rows elements within the matrix
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Fangjun Jiang
le 13 Mar 2020
a=rand(6,7);
b=reshape(a,3,[]);
c=mean(b);
d=reshape(c,2,[]);
1 commentaire
Abdulhakim Alezzi
le 13 Mar 2020
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!