Contourfm within bounding box

Hi,
I have a shapefile containing the coastline of my study region. I would like to spatially interpolate elevation such that all areas within the coastline, and not just the points where data is available, are filled.
Here is what I have so far. Something is definitely wrong. I can see the color bar and not the contour filled image as my output.
Please help. &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
figure
[LONG, LAT]=meshgrid(linspace(min(long),max(long)),linspace(min(lat),max(lat)));
F = TriScatteredInterp(long,lat,elev);
qz = F(LONG,LAT);
axesm('MapProjection','lambert', 'MapParallels',[],...
'MapLatLimit',[48 61], 'MapLonLimit',[-122 -89]+360)
geoshow('PrairiesBoundaries.shp', 'DisplayType','polygon','FaceColor','none', 'EdgeColor','none')
hold on
[cs,h]=contourfm(LONG,LAT,qz,'.b','LineWidth',1.3);
clabel(cs,h,'fontsize',12);
hcb = colorbar('horiz');
set(get(hcb,'Xlabel'),'String','elevation')

1 Comment

Oh! I got the answer by using 'scatteredInterpolant'.

Sign in to comment.

Answers (0)

Products

Asked:

on 28 Jun 2013

Community Treasure Hunt

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

Start Hunting!