フィルターのクリア

How to take an average of three dimensional data?

16 ビュー (過去 30 日間)
SONI SONI
SONI SONI 2018 年 3 月 14 日
コメント済み: Walter Roberson 2021 年 8 月 16 日
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.

採用された回答

James Tursa
James Tursa 2018 年 3 月 14 日
x = your 3D matrix
result = mean(reshape(x,360,720,12,5),3);
  7 件のコメント
elliot brooksbank
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
Walter Roberson 2021 年 8 月 16 日
mean(yourmatrix, [1 2])
%or
mean(reshape(yourmatrix, [], size(YourMatrix,3)))

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by