Interpolation between points depends on values in between

조회 수: 2 (최근 30일)
Wim
Wim 2015년 1월 14일
편집: Wim 2015년 1월 15일
I am having troubles understanding interpolation methods in MATLAB 2013.
In a grid I want to interpolate temperatures from measurements at 25 grid points, this works just fine using the following code:
for i=1:25
x(i) = WRF(i).lon;
y(i) = WRF(i).lat;
v(i) = WRF(i).temp;
end
[xq,yq] = meshgrid(4.7740:.001:5.0144, 52.3000:.001:52.3965);
vq = griddata(x,y,v,xq,yq);
However, I that want the interpolation takes into account changes in land use. I already have a grid of similar size that has land use values (values can be 1, 2 or 3). When the land use value of two grid cells is the same, interpolation should be less than when land use is different. (It is assumed that temperature changes more sudden at the edge of city/grass than in the city itself).
EDIT: added a sketch picture for clarity with an example for 1 dimension. The interpolation should take into account the underlying land use matrix (red/green).
  댓글 수: 2
Sara
Sara 2015년 1월 14일
What does it means that "interpolation should be less"?
John D'Errico
John D'Errico 2015년 1월 14일
Huh? You need to define a model that knows what you are doing. A general interpolation method does not care about extraneous variables, nor can it do so. Only you know what that extraneous variable does, and how it impacts the interpolation. And you have clearly not explained it here.
Sara has it right. You must explain yourself more clearly if you want an answer.
Most likely, you would need to formulate an interpolant that behaves differently based on this extraneous parameter. Of course, that will prevent you from using griddata.

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

답변 (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