Mapping Toolbox Previous page   Next Page
meanm

Compute mean for geographic data

Syntax

[latmean,lonmean] = meanm(lat,lon) returns row vectors of the geographic mean positions of the columns of the input latitude and longitude points.

[latmean,lonmean] = meanm(lat,lon,units) indicates the angular units of the data. When the standard angle string units is omitted, 'degrees' is assumed.

[latmean,lonmean] = meanm(lat,lon,ellipsoid) specifies the elliptical definition of the Earth to be used with the two-element ellipsoid vector. The default ellipsoid model is a spherical Earth, which is sufficient for most applications.

If a single output argument is used, then geomeans = [latmean,longmean]. This is particularly useful if the original lat and lon inputs are column vectors.

Background

Finding the mean position of geographic points is more complicated than simply averaging the latitudes and longitudes. meanm determines mean position through three-dimensional vector addition. See "Geographic Statistics" in the "Mapping Applications" chapter of the Mapping Toolbox User's Guide documentation.

Examples

Create random latitude and longitude matrices:

See Also

filterm
Geographic filter for data sets
hista
Spatial equal area histogram
histr
Spatial equirectangular histogram
stdist
Standard distances for geographic data
stdm
Standard deviation for geographic data


Previous page  mdistort meshgrat 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