MATLAB: Plot bilinear interpolated gridded data spatially on a map (Cannot get Interp2 to give smooth output)

gridinterp2plotsurface

I am using the following code to plot gridded data on a map over a region but I would like to know how to plot the interpolated data so that I get continuous data plotted over the region and the data does not look gridded. 'lat' and 'lon' are vectors (1×21 and 1×33) containing the latitude and longitude coordinates respectively.
ax = worldmap(latlim, lonlim);
S = shaperead('landareas','UseGeoCoords',true);
surfacem(lat, lon, ans');
geoshow([S.Lat], [S.Lon],'Color','black');
I am seeing a lot of documentation on using interp2 but I am not getting mine to work even when I try to create a meshgrid using lat and lon (cannot attach the data). I do the following with interp2:
LON,LAT] = meshgrid(unique(lon),unique(lat));
interp2(lon, lat, testdata', LON, LAT);
That gives me a result but I then want to plot it over a region without it looking gridded. testdata is a 33×21 matrix. Any ideas? I have seen some examples here on interpolation but I am not sure how to apply it conveniently with the data I have. I am surprised that there is not more information on this or why I am just sucking at finding the answer!
Thanks,

Best Answer

Something to keep in mind: If you only have 33x21 actual data points, a smooth surface plot that does not look gridded will imply to the viewer that you have much higher resolution data than you actually do. But sometimes that's okay. You might not need to use interp2. Instead, simply follow your surfacem command with
shading interp