Weighted average of lat lon data

조회 수: 4 (최근 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 CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by