| Mapping Toolbox | ![]() |
Trim line vector map to a specified region
Syntax
[lat,lon] = maptriml(lat0,lon0,latlim,lonlim)
Description
[lat,lon] = maptriml(lat0,lon0,latlim,lonlim) returns filtered NaN-delimited vector map data sets from which all points lying outside the desired latitude and longitude limits have been discarded. These limits are specified by the two-element vectors latlim and lonlim, which are two-element vectors of the form [south-limit north-limit] and [west-limit east-limit], respectively.
Examples
lat0 = [1:10,9:-1:0]; lon0 = -30:-11;
[lat,lon] = maptriml(lat0,lon0,[3 7],[-29 -12]);
[lat lon]
ans =
NaN NaN
3 -28
4 -27
5 -26
6 -25
7 -24
NaN NaN
7 -18
6 -17
5 -16
4 -15
3 -14
NaN NaN
Notice that trimmed line segment ends have NaNs inserted at trim points.
See Also
maptrimp |
Trim patch map data to specified region |
maptrims |
Trim surface matrix map data to specified region |
| maps | maptrimp | ![]() |