Mapping Toolbox Previous page   Next Page
filterm

Filter geographic data sets

Syntax

[newlat,newlong] = filterm(lat,long,map,refvec,allowed) filters geographic data based upon the corresponding entries of a regular data grid, map, with a three-element referencing vector refvec. The data locations to be filtered are 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 the topo map for starters:

Then generate 100 random points:

Make a land map, which is 1 where topo>0 elevation:

15 of the 100 random points fall on land.

See Also

hista
Spatial equal area histogram
histr
Spatial equirectangular histogram


Previous page  fillm findm Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS