Borrar filtros
Borrar filtros

Weighted average of lat lon data

13 visualizaciones (últimos 30 días)
Brendan Clark
Brendan Clark el 18 de Mayo de 2021
Comentada: Rohit shaw el 22 de Nov. de 2021
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 comentario
Rohit shaw
Rohit shaw el 22 de Nov. de 2021
Hello brendan, did the given answer work for you?

Iniciar sesión para comentar.

Respuestas (1)

Mathieu NOE
Mathieu NOE el 19 de Mayo de 2021
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);

Categorías

Más información sobre Financial Data en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by