calculating mean values of a 3D matrix
Ältere Kommentare anzeigen
hi.
I have a 3D matrix. size 79x63x100
I want to calc the mean of each of the 79x63 values so to get a 2D matrix the size of 79x63x1
but when i do mean(mat) i get it in the size of 1x63x100
how should I write it?
Thanks, Noa
2 Kommentare
Deepak Singh
am 15 Jul. 2015
You can mention the dimension you want to take mean across. Something like this will work: x=mean(mat,3);
ankit patel
am 11 Apr. 2020
its not working if i change the value 3 with more than 3 in your equation.
Akzeptierte Antwort
Weitere Antworten (1)
Zoe
am 28 Nov. 2017
shape2 = reshape(yourarray,[100 79*64]);
meanArray = mean(shape2,2);
Kategorien
Mehr zu Resizing and Reshaping 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!