maptriml - Trim lines to latitude-longitude quadrangle
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 have the form [south-limit north-limit] and [west-limit
east-limit], respectively.
Examples
Following is a simple example:
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 NaNNotice that trimmed line segment ends have NaNs
inserted at trim points.
See Also
maptrimp, maptrims
 | mapshow | | maptrimp |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit