how to average a three dimensional matrix at each level?

Sir, I have a matrix of dimension (40*40*16)which are for latitude, longitude and altitude. I need to average over latitude and longitude for each altitude so that i can get the resultant matrix of dimension (1*16). Please help me.
thanks

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 5월 7일
a=rand(40,40,16) % Example
out=squeeze(mean(mean(a)))

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

질문:

2014년 5월 7일

답변:

2014년 5월 7일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by