MATLAB: Error Reading a DEM file using “gtopo30” function of the Mapping Toolbox

Mapping Toolbox

I am running into an error while reading a DEM file with "W140N40" tile using "gtopo30" function of the Mapping Toolbox. The region tile is for Southern California.

Best Answer

Start by downloading the "W140N40" tile from here:
Note: Make sure to download  "w140n40.hdr.zip" and "w140n40.dmw.zip" and place the extracted HDR and DEM in your MATLAB current folder.
Execute the below commands to get the map of the region:
[Z,refvec] = gtopo30('W140N40',1,[34 36],[-120 -118]);
figure
usamap(Z,refvec);
geoshow(Z,refvec,'DisplayType','surface');
demcmap(Z);