Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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   NaN

Notice that trimmed line segment ends have NaNs inserted at trim points.

See Also

|

Introduced before R2006a

Was this topic helpful?