help with griddata (interpolate 2D data)
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
Réponses (1)
ANKUR KUMAR
le 29 Sep 2018
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 commentaires
Voir également
Catégories
En savoir plus sur Interpolation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!