Interpolation between points depends on values in between

2 Ansichten (letzte 30 Tage)
Wim
Wim am 14 Jan. 2015
Bearbeitet: Wim am 15 Jan. 2015
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 Kommentare
Sara
Sara am 14 Jan. 2015
What does it means that "interpolation should be less"?
John D'Errico
John D'Errico am 14 Jan. 2015
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by