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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

질문:

2017년 8월 7일

답변:

2017년 8월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by