Mapping Toolbox | ![]() ![]() |
Create spatial equal area histogram
Syntax
[lat,lon,num] = hista(lats,lons) [lat,lon,num] = hista(lats,lons,binarea) [lat,lon,num] = hista(lats,lons,binarea,geoid) [lat,lon,num] = hista(lats,lons,binarea,units) [lat,lon,num] = hista(lats,lons,binarea,geoid,units)
Description
[lat,lon,num] = hista(lats,lons) returns the center coordinates of equal-area bins and the number of observations falling in each based on the geographically distributed input data.
[lat,lon,num] = hista(lats,lons,binarea) specifies the equal area bin size, in square kilometers. It is 100 km2 by default.
[lat,lon,num] = hista(lats,lons,binarea,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.
[lat,lon,num] = hista(lats,lons,binarea,units
) specifies the standard angle unit string. The default value is 'degrees'
.
Examples
lats = rand(4) lats = 0.4451 0.8462 0.8381 0.8318 0.9318 0.5252 0.0196 0.5028 0.4660 0.2026 0.6813 0.7095 0.4186 0.6721 0.3795 0.4289 longs = rand(4) longs = 0.3046 0.3028 0.3784 0.4966 0.1897 0.5417 0.8600 0.8998 0.1934 0.1509 0.8537 0.8216 0.6822 0.6979 0.5936 0.6449
Bin the data in 50-by-50 km cells (2500 sq km):
[lat,lon,num] = hista(lats,longs,2500); [lat lon num] ans = 0.2574 0.3757 4.0000 0.7070 0.3757 5.0000 -0.1923 0.8253 1.0000 0.2573 0.8253 2.0000 0.7070 0.8254 4.0000
See Also
eqa2grn grn2eqa |
Greenwich/equal are a conversion |
histr |
Spatial equirectangular histogram |
![]() | hidem | histr | ![]() |