3-D lighted shaded relief of regular data grid on
h = meshlsrm(...)
meshlsrm(Z,R) displays the regular data grid
Z colored according to elevation and surface slopes. Specify
R as a
GeographicCellsReference object or a
GeographicPostingsReference object. The
R must be consistent with
meshlsrm(Z,R,[azim elev]) displays
the regular data grid
Z with the light coming from
the specified azimuth and elevation. Angles are specified in degrees,
with the azimuth measured clockwise from North, and elevation up from
the zero plane of the surface.
meshlsrm(Z,R,[azim elev],cmap) displays
the regular data grid
Z using the specified colormap.
The number of grayscales is chosen to keep the size of the shaded
colormap below 256. If the vector of
empty, the default locations are used. Color axis limits are computed
from the data.
meshlsrm(Z,R,[azim elev],cmap,clim) uses
the provided color axis limits, which by default are computed from
h = meshlsrm(...) returns
the handle to the surface drawn.
Load elevation data and a geographic cells reference object for the Korean peninsula. Create a
world map using appropriate latitude and longitude limits for the peninsula. Then,
display a lighted shaded relief map. By default,
meshlsrm applies a
colormap appropriate for elevation data.
load korea5c worldmap(korea5c,korea5cR) meshlsrm(korea5c,korea5cR,[45 65])
This function effectively multiplies two colormaps, one with color based on elevation, the other with a grayscale based on the slope of the surface, to create a new colormap. This produces an effect similar to using a light on a surface, but with all of the visible colors actually in the colormap. Lighting calculations are performed on the unprojected data.
Version HistoryIntroduced before R2006a
meshlsrm will not accept referencing vectors or referencing matrices as input
meshlsrm function will not accept referencing vectors or
referencing matrices as input in a future release. Use a geographic raster reference
object, specified as a
GeographicPostingsReference object, as input instead. Reference
objects have several advantages over referencing vectors and referencing
Unlike referencing vectors and referencing matrices, reference objects have properties that document the size of the associated raster, its geographic limits, and the direction of its rows and columns.
You can manipulate the limits of geographic rasters associated with reference objects using the
You can manipulate the size and resolution of geographic rasters associated with reference objects using the
To update your code, create a geographic reference object.
Create a geographic reference object for a raster of cells by using the
Create a geographic reference object for a raster of regularly posted samples by using the
Convert from a referencing vector to a geographic reference object by using the
Convert from a referencing matrix to a geographic reference object by using the
Once you have created a reference object, replace uses of the referencing vector or referencing matrix in your code with the reference object.