Weighted average of lat lon data

1 回表示 (過去 30 日間)
Brendan Clark
Brendan Clark 2021 年 5 月 18 日
コメント済み: Rohit shaw 2021 年 11 月 22 日
I have temperature data with dimensions [288 192 60] or [lat lon time]. I would like to calculated the weighted average temperature with area data [288 192] to get a time series of weighted average temperature [1 60]. Does anyone know a good way to do this in matlab?
  1 件のコメント
Rohit shaw
Rohit shaw 2021 年 11 月 22 日
Hello brendan, did the given answer work for you?

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

回答 (1 件)

Mathieu NOE
Mathieu NOE 2021 年 5 月 19 日
hello
my 2 cents suggestion
data = rand(288,192,60); % dummy data
[m,n,p] = size(data);
dataw = zeros(1,p);
for ci = 1:p
tmp = data(:,:,ci);
dataw(ci) = mean(tmp,'all'); % 2D spatial linear average of the temperature
end
plot(dataw);

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by