フィルターのクリア

help with griddata (interpolate 2D data)

4 ビュー (過去 30 日間)
Felipe Silva
Felipe Silva 2018 年 9 月 28 日
回答済み: ANKUR KUMAR 2018 年 9 月 29 日
Hello,
I have a map with lon(1101x1) and lat(1001x1) and sst(1101x1001) and im trying to interpolate this for another map i have(290x940). Im using griddata function but after hours i get a vq=[ ]. Something deleted the values.
Workspace: grade (1101x1001) sst (1101x1001) lat_rho (290x940) lon_rho (290x940)
vq=griddata(grade,grade,sst,lon_rho,lat_rho);
What is going wrong?
Thanks for the attention
  1 件のコメント
jonas
jonas 2018 年 9 月 29 日
Upload the data

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

回答 (1 件)

ANKUR KUMAR
ANKUR KUMAR 2018 年 9 月 29 日
Since you have not uploaded any data set, I am taking an example to resolve your issue.
lon=[65:95];
lat=[0:35];
var1=rand(36,31);
Suppose you wish to interpolate var1 over different grids.
Lets take new grid latitude as 0:0.1:35 and longitude as 65:0.1:95
lon1=[65:0.1:95];
lat1=[0:0.1:35];
[xx,yy]=meshgrid(lat1,lon1);
var1_interpolated=interp2(lat,lon,var1',xx,yy);

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by