| Mapping Toolbox | ![]() |
Extract segments of NaN-delimited polygon vectors to cell arrays.
Syntax
[latcells,loncells] = polysplit(lat,lon)
Description
[latcells,loncells] = polysplit(lat,lon) returns the NaN-delimited segments of the vectors lat and lon as cell arrays. Each element of the cell array contains one segment.
Example
lat = [1 2 3 NaN 4 NaN 5 6 7 8 9]';
lon = [9 8 7 NaN 6 NaN 5 4 3 2 1]';
[latcells,loncells] = polysplit(lat,lon);
[latcells' loncells']
ans =
[3x1 double] [3x1 double]
[ 4] [ 6]
[5x1 double] [5x1 double]
See Also
polybool |
Perform polygon boolean operations |
polyjoin |
Convert polygon segments from cell array to vector format |
| polymerge | polyxpoly | ![]() |