histr
Histogram for geographic points with equirectangular bins
Syntax
[lat,lon,num,wnum] = histr(lats,lons)
[lat,lon,num,wnum] = histr(lats,lons,units)
[lat,lon,num,wnum] = histr(lats,lons,bindensty)
Description
[lat,lon,num,wnum] = histr(lats,lons)
returns
the center coordinates of equal-rectangular bins and the number of
observations, num
, falling in each based on the
geographically distributed input data. Additionally, an area-weighted
observation value, wnum
, is returned. wnum
is
the bin's num
divided by its normalized area. The
largest bin has the same num
and wnum
;
a smaller bin has a larger wnum
than num
.
[lat,lon,num,wnum] = histr(lats,lons,units)
where units
specifies
the angle unit. The default value is 'degrees'
.
[lat,lon,num,wnum] = histr(lats,lons,bindensty)
sets
the number of bins per angular unit. For example, if units
is
'degrees'
, a bindensty
of 10 would be 10 bins
per degree of latitude or longitude, resulting in 100 bins per
square degree. The default is one cell per angular unit.
The histr
function sorts geographic data
into equirectangular bins for histogram purposes. Equirectangular
in this context means that each bin has the same angular measurement
on each side (e.g., 1º-by-1º). Consequently, the result
is not an equal-area histogram. The hista
function
provides that capability. However, the results of histr
can
be weighted by their area bias to correct for this, in some sense.
Examples
Version History
Introduced before R2006a