# Weighted Average for a certain depth

5 visualizaciones (últimos 30 días)
tqou37 el 4 de Abr. de 2023
Editada: tqou37 el 24 de Mayo de 2023
Weighted Average for a certain depth
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (2)

Sulaymon Eshkabilov el 5 de Abr. de 2023
For the weighted mean calcution - see this MATLAB submission -
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Peter Perkins el 5 de Abr. de 2023
At one point you say "weighted soil moisture average to a given depth" and at another you say "soil moisture depth average". You don't say anything about what weights you are talking about. The only sense I can make out of this is that you mean the soil moisture *interpolated* at a specified depth, given multiple measurements on each day at fixed depths, averaged within day at each depth.
Maker a timetable TT of the raw moisture measurements, with five variables, one for each depth. Then
TTdaily = retime(TT,"daily","mean");
moisture = TT.Variables
depth = [5 15 30 50 75];
depths = [21.50 32.48];
interpMoisture = interp1(moisture,depth,depths)
If you mean something other than that, you need to be a lot more forthcoming.
##### 2 comentariosMostrar NingunoOcultar Ninguno
tqou37 el 5 de Abr. de 2023
Peter Perkins el 6 de Abr. de 2023
You need to be a lot more clear. You keep saying "average", but you've never said "interpolate", which is what I think you want. You've said "three soil moisure tables" but only shown one. I'm guessing what you want is very similar to what I already suggested, but I'm guessing.
Show a worked example of exactly what you are starting with, the calculations, and what you want to end up with.

Iniciar sesión para comentar.

### Categorías

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

R2022a

### Community Treasure Hunt

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

Start Hunting!

Translated by