Weighted Average for a certain depth
6 views (last 30 days)
Peter Perkins on 5 Apr 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.