Mean computaion in matlab

1 回表示 (過去 30 日間)
Berhanu Geremew
Berhanu Geremew 2021 年 7 月 22 日
回答済み: Berhanu Geremew 2021 年 7 月 23 日
How to comput mean of 3D mat file having lon, lat ,value !

採用された回答

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2021 年 7 月 22 日
If your data is in a matrix of dimensions [samples x 3], e.g.
data=[lon1 lat1 value1;
lon2 lat2 value2;
lon3 lat3 value3;
lon4 lat4 value4;
...
]
then you simply need to do
mean(data) and that will calculate the mean of each column.
Hope this solves your question. If yes, please accept the answer, if not, let me know.

その他の回答 (2 件)

James Tursa
James Tursa 2021 年 7 月 22 日
You can specify the dimension to use with the mean( ) function. E.g., maybe this is the computation you want:
data = your 3D matrix
ave = mean(data,3); % mean of 3rd dimension

Berhanu Geremew
Berhanu Geremew 2021 年 7 月 23 日
Dear Jemes
Thank you so much Jemes
I need the spatial mean for earch grid value Lat, Lon, Mean(Value) .
Cheers
Berhanu

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by