help with griddata (interpolate 2D data)
조회 수: 1 (최근 30일)
이전 댓글 표시
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개)
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);
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!