Interpolate data on a single point

5 visualizaciones (últimos 30 días)
Andrew Goenner
Andrew Goenner el 7 de Ag. de 2017
Respondida: Chad Greene el 10 de Ag. de 2017
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

Respuesta aceptada

Chad Greene
Chad Greene el 10 de Ag. de 2017
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)

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by