Mapping Toolbox | ![]() ![]() |
Encode data points into regular matrix map
Syntax
newmap = imbedm(lat,lon,value,map,maplegend) newmap = imbedm(lat,lon,value,map,maplegend,units) [newmap,badindx] = imbedm(lat,lon,value,map,maplegend,units)
Description
newmap = imbedm(lat,long,value,map,maplegend) resets certain entries of a regular matrix map, map
. The entries to be reset correspond to the locations defined by the latitude and longitude position vectors lat
and lon
. The entries are reset to the same number if value
is a scalar, or to individually specified numbers if value
is a vector the same size as lat
and lon
. If any points lie outside the input map
, a warning is displayed.
newmap = imbedm(lat,lon,value,map,maplegend,units
) specifies the units of the vectors lat
and lon
, where units
is any valid angle units string ('degrees
' by default).
[newmap,badindx] = imbedm(lat,lon,value,map,maplegend,units
) returns the indices of lat
and lon
corresponding to points outside the map
in the variable badindx
.
Examples
Create a simple map and imbed new values in it:
map = ones(3,6) map = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 maplegend = [1/60 90 -180] maplegend = 0.0167 90.0000 -180.0000 newmap = imbedm([23 -23], [45 -45],[5 5],map,maplegend) newmap = 1 1 1 1 1 1 1 1 5 5 1 1 1 1 1 1 1 1
See Also
ltln2val |
Latitude and longitude to matrix entry value |
setpostn |
Latitude and longitude to row and column |
![]() | imagem | inputm | ![]() |