Mapping Toolbox | ![]() ![]() |
Compute standard deviation for geographic data
Syntax
[latdev,londev] = stdm(lat,lon) [latdev,londev] = stdm(lat,lon,geoid) [latdev,londev] = stdm(lat,lon,units
) [latdev,londev] = stdm(lat,lon,geoid,units
) geodevs = stdm(...)
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 the section entitled "Geostatistics" in the "Mapping Applications" chapter of the Mapping Toolbox User's Guide.
Description
[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,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).
[latdev,londev] = stdm(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. Output measurements are in terms of the distance units of the geoid
vector.
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.
Examples
Create latitude and longitude matrices using the worldo
dataset (compare with 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 | ![]() |