Mapping Toolbox    
meanm

Compute mean for geographic data

Syntax

Background

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

Description

[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,geoid) specifies the elliptical definition of the Earth to be used with the two-element geoid vector. The default geoid 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.

Examples

Create random latitude and longitude matrices:

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


  mdistort meshgrat