Interpolating latitudes and longitudes

4 ビュー (過去 30 日間)
emhol241
emhol241 2018 年 10 月 28 日
編集済み: jonas 2018 年 10 月 28 日
I have a set of latitudes and longitudes (both 506 x 270) sampled at 5km resolution and need it in 1km resolution (size 2030 x 1354). How do I interpolate between points to do this?

回答 (1 件)

jonas
jonas 2018 年 10 月 28 日
編集済み: jonas 2018 年 10 月 28 日
lat and lon are your 5-km-resolution arrays and v (506x270) is the variable you want to interpolate.
% create finer grid
[latq lonq] = meshgrid(min(lat(:)):1:max(lat(:)),min(lon(:)):1:max(lon(:)))
% interpolate
vq = griddata(lat,lon,v,latq,lonq)
  2 件のコメント
jonas
jonas 2018 年 10 月 28 日
Oh.. then just use meshgrid to build your grid without interpolating. Just skip the second part. I just assumed that your 5 km grid resolution had some meaning because you mentioned it, as well as interpolation, in the question... Creating a grid has nothing to do with either.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by