Interpolate data on a single point
7 ビュー (過去 30 日間)
古いコメントを表示
Hello All
I want to bilinearly interpolate some data that is occurring on one point in space. I have four files (939x1129 grid points) that all have the same coordinates and I want to find out where a certain percentage will occur on each of the grid points. Each grid point as four values:lat and lon(unneeded for this problem), rainfall amount(inches) and the probability(%) of that rainfall amount falling at that location.
(Rainfall amount, percent) (.5, 94%) (1, 87%) (1.5, 36%) (2, 10%)
What I need to find is the amount of rainfall that will match with two different probability (R1,5%) and (R2, 95%). I have been looking at interp2 and griddata but both seems to require a function input to work, which I don't have.
Andrew
0 件のコメント
採用された回答
Chad Greene
2017 年 8 月 10 日
Hi Andrew,
Your question is a little bit unclear. It would helpful to have a minimal working example, but from what I understand, I don't think you need to interpolate anything, and griddata is not necessary, as your matrices are already gridded.
For a rainfall matrix R with corresponding probabilities P, you can get a logical mask of all the grid points meeting a condition like
mask = P>=0.05 &P<0.10;
which would have ones wherever P is between 0.05 and 0.10, and zeros elsewhere. Then the corresponding rainfall in those grid cells is
R(mask)
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!