| Mapping Toolbox | Search  Help Desk |
| filterm | Examples See Also |
Syntax
[newlat,newlong] = filterm(lat,long,map,maplegend,allowed)
Description
[newlat,newlong] = filterm(lat,long,map,maplegend,allowed) filters geographic data based upon the corresponding entries of a regular matrix map,map, with a three-element map legend vector maplegend. The data locations to be filtered is input in the vectors lat and lon. For those locations corresponding to entries of map equal to one of the values contained in the vector allowed, an output location is returned in newlat and newlon. Those locations not corresponding to such entries of map are not returned in the outputs.
Examples
Filter a random set of 100 geographic points. Use thetopo map for starters:
load topo
Then, generate 100 random points:
Make a land map, which is "lat = -90+180*rand(100,1);long = -180+360*rand(100,1);
1" where topo>0 elevation:
15 of the 100 random points fell on land.land = topo>0;[newlat,newlong] = filterm(lat,long,land,topolegend,1);size(newlat)ans =15 1
See Also
hista |
Spatial equal area histogram |
histr |
Spatial equirectangular histogram |