How to sum multiple rows elements within the matrix
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Fangjun Jiang
il 13 Mar 2020
a=rand(6,7);
b=reshape(a,3,[]);
c=mean(b);
d=reshape(c,2,[]);
1 Commento
Abdulhakim Alezzi
il 13 Mar 2020
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!