imbedm
Encode data points into regular data grid
Syntax
Z = imbedm(lat, lon, value, Z, R)
Z = imbedm(lat, lon, value, Z, R, units)
[Z, indxPointOutsideGrid] = imbedm(...)
Description
Z = imbedm(lat, lon, value, Z, R) resets certain entries of a regular
data grid, Z. Specify R as a GeographicCellsReference or GeographicPostingsReference object. The RasterSize
property of R must be consistent with
size(Z).
Z = imbedm(lat, lon, value, Z, R, units) specifies the units of the
vectors lat and lon, where
units is any valid angle units character vector
('degrees' by default).
[Z, indxPointOutsideGrid] = imbedm(...) returns
the indices of lat and lon corresponding
to points outside the grid in the variable indxPointOutsideGrid.
Examples
Create a simple grid map and embed new values in it:
Z = ones(3,6)
Z =
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
refvec = [1/60 90 -180]
refvec =
0.0167 90.0000 -180.0000
newgrid = imbedm([23 -23], [45 -45],[5 5],Z,refvec)
newgrid =
1 1 1 1 1 1
1 1 5 5 1 1
1 1 1 1 1 1