How to take an average of three dimensional data?
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a three-dimensional matrix (360 x 720 x 60), in this matrix 60 represents monthly data of 5yeras (for example monthly temperature). I want to take the annual average of these monthly values so that the final matrix will be 360 x 720 x 5.
0 个评论
采纳的回答
James Tursa
2018-3-14
x = your 3D matrix
result = mean(reshape(x,360,720,12,5),3);
7 个评论
elliot brooksbank
2021-8-16
Hi james
i have a similiar dataset but the matrix is (30x17x456) the 456 represents months i need the monthly average temperature for each month
Walter Roberson
2021-8-16
mean(yourmatrix, [1 2])
%or
mean(reshape(yourmatrix, [], size(YourMatrix,3)))
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!