How to sum multiple rows elements within the matrix
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Fangjun Jiang
am 13 Mär. 2020
a=rand(6,7);
b=reshape(a,3,[]);
c=mean(b);
d=reshape(c,2,[]);
1 Kommentar
Abdulhakim Alezzi
am 13 Mär. 2020
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!