calculating mean values of a 3D matrix
Mostrar comentarios más antiguos
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 comentarios
Deepak Singh
el 15 de Jul. de 2015
You can mention the dimension you want to take mean across. Something like this will work: x=mean(mat,3);
ankit patel
el 11 de Abr. de 2020
its not working if i change the value 3 with more than 3 in your equation.
Respuesta aceptada
Más respuestas (1)
Zoe
el 28 de Nov. de 2017
shape2 = reshape(yourarray,[100 79*64]);
meanArray = mean(shape2,2);
Categorías
Más información sobre Resizing and Reshaping 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!