| Mapping Toolbox | ![]() |
Compute standard deviation for geographic data
Syntax
[latdev,londev] = stdm(lat,lon) returns row vectors of the latitude and longitude geographic standard deviations for the data points specified by the columns of lat and lon.
[latdev,londev] = stdm(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. Output measurements are in terms of the distance units of the ellipsoid vector.
[latdev,londev] = stdm(lat,lon,units) indicates the angular units of the data. When the standard angle string units is omitted, 'degrees' is assumed. Output measurements are in terms of these units (as arc length distance).
If a single output argument is used, then geodevs = [latdev longdev]. This is particularly useful if the original lat and lon inputs are column vectors.
Background
Determining the deviations of geographic data in latitude and longitude is more complicated than simple sum-of-squares deviations from the data averages. For latitude deviation, a straightforward angular standard deviation calculation is performed from the geographic mean as calculated by meanm. For longitudes, a similar calculation is performed based on data departure rather than on angular deviation. See "Geographic Statistics" in the "Mapping Applications" chapter of the Mapping Toolbox User's Guide documentation.
Examples
Create latitude and longitude matrices using the worldlo data set (compare with the example for stdist):
load worldlo lat=[PPpoint(2:5).lat] lat = 5.3386 24.5808 5.4619 36.8862 lon=[PPpoint(2:5).long] lon = -3.7602 54.9619 -0.3450 35.5141 [latstd,lonstd]=stdm(lat,lon) latstd = 8.9962 lonstd = 159.1153
See Also
departure |
Departure of longitudes at specific latitudes |
filterm |
Geographic filter for data sets |
hista |
Spatial equal-area histogram |
histr |
Spatial equirectangular histogram |
meanm |
Mean for geographic data |
stdist |
Standard distances for geographic data |
| stdist | stem3m | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |