| Mapping Toolbox | Search  Help Desk |
| maptrims | Examples See Also |
Trim surface regular matrix map data to a specified region
Syntax
[submap,sublegend] = maptrims(map,maplegend,latlim,lonlim) [submap,sublegend] = maptrims(map,maplegend,latlim,lonlim,scale)
Description
This command selects a portion of a larger matrix map defined by a latitude-longitude quadrangle. [submap,sublegend] = maptrims(map,maplegend,latlim,lonlim) returns the subset of the input regular matrixmap between the latitude and longitude limits, in degrees, defined by the two-element vectors latlim and lonlim. maplegend is the map legend vector of the input matrix map; sublegend is the map legend vector of the output matrix map.
[submap,sublegend] = maptrims(map,maplegend,latlim,lonlim,scale) is a means of further reducing the size of the output matrix. The cells-per-degree scale of the original matrix is given by the first element of maplegend. The desired cells-per-degree scale in the output map is given by scale, which must equally divide maplegend(1). For example, if maplegend(1) were 20 (cells per degree), then scale could be 1, 2, 4, 5, 10 or 20.
The reduced matrix is created using resizem with a 'nearest' interpolation method.
Examples
load topo
[submap,sublegend] = maptrims(topo,topolegend,...
[80.5 85],[165 170.5])
submap =
-2826 -2810 -2802 -2793 -2790
-2915 -2913 -2905 -2884 -2844
-3192 -3186 -3165 -3122 -3078
-3399 -3324 -3273 -3214 -3167
sublegend =
1 85 165
See Also
map legend vector |
Data structure for describing regular matrix maps |
maptriml |
Trim line vector map data to specified region |
maptrimp |
Trim patch map data to specified region |
resizem |
Resize a matrix map |