Interpolation between points depends on values in between

2 次查看(过去 30 天)
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 个评论
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