Problem with griddata giving NaN
古いコメントを表示
Let's supose I have three points
,
,
. In each point I have a data of temperature in multiple times. Here I offer a simplification of this problem:
lat = [27.5 29.3 30.1
27.5 29.3 30.1
27.5 29.3 30.1]; % Matrix of latitudes. Col1 = lat1, Col2 = lat2, Col3 = lat3.
lon = [16.5 18.9 19.9
16.5 18.9 19.9
16.5 18.9 19.9]; % Matrix of longitudes. Col1 = lon1, Col2 = lon2, Col3 = lon3.
temp = [23.5 27.8 30.5
25.9 21.3 45.8
54.3 20.1 10.4]; % i.e., temp(1,1) corresponds to (27.5,16.5), temp(1,2) corresponds to (29.3,18.9)...
time = [10 10 10
20 20 20
30 30 30]; % The first row of each matrix was measured at time 10.
Now, I want to find the temperature in
,
and
.
latQ = 28;
lonQ = 19.3;
timeQ = 25.3;
griddata(lat, lon, time, temp, latQ, lonQ, timeQ,'linear')
Why does griddata return NaN if my query points are "inside the limits"?
1 件のコメント
KSSV
2021 年 8 月 16 日
This is an extrapolation, the interpolated point do not lie in the intervel of given points.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Vector and Raster Map Display についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!