|
"starski" wrote in message <jgl62t$p2s$1@newscl01ah.mathworks.com>...
> Hi
>
> I am trying to plot some latitude and longitude coordinates in Matlab and I am getting errors. I am reading in a shapefile (which was already projected in ArcMap) and trying to plot it using the following commands.
>
> coords=shaperead('MDR_locality8.shp','UseGeoCoords',true)
> geoshow(lat,long)
>
> The first line seems to work fine. lat and long are what latitude and longitude are called in the coords file. I get the following error after the geoshow command:
> ??? Undefined function or variable 'lat'.
>
> I don't understand what the problem is with lat. This is definitely what it is called in the coords file! Can anyone help me?
>
> Thanks in advance
> Helen
Helen,
Output from the shaperead command is a structure array. If you type, coords, what do you see? If lat and long are indeed 'fields' of the structure, then you could probably use (though I am unfamiliar with the function GEOSHOW),
geoshow(coords.lat,coords.long)
-Andrew
|