Interpolate data on a single point

3 次查看(过去 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

采纳的回答

Chad Greene
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 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by