Weighted Average for a certain depth

조회 수: 9 (최근 30일)
tqou37
tqou37 2023년 4월 4일
편집: tqou37 2023년 5월 24일
Weighted Average for a certain depth

답변 (2개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 4월 5일
For the weighted mean calcution - see this MATLAB submission -

Peter Perkins
Peter Perkins 2023년 4월 5일
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
tqou37
tqou37 2023년 4월 5일
Thanks for the advice. I added more info to not be so vague.
Peter Perkins
Peter Perkins 2023년 4월 6일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Agriculture에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by