From: Jamie on
Hello!

So, I've just discovered the surflm function. I'd been trying to write my own shadowing program for a while with naught but errors. So I got the surflm function to work just fine, in that it shows me a surface plot of the shadows created by the topography. My question is, however silly, I don't really understand how to get to the matrix it created to make the plot. In other words, surflm gives me access to the plot of shadows, but how to I get access to the actual data? What I need from surflm (or something else) is an actual matrix the same size of the map with zeros where there is no shadow, and ones where there is a shadow (or some other value system for indicating shadowed pixels).

Does that make sense? My code is very simple:

surf(DEM1)
axesm
shading flat
surflm([latmin latmax], [lonmin lonmax], DEM1,[solar_az solar_elev])

Thank you for any help!