Fast 2D histogram calculation

버전 1.0.0.0 (2.85 KB) 작성자: Amanda
Fast calculation of 2D histogram. Optionally displays surf plot of histogram.
다운로드 수: 1.7K
업데이트 날짜: 2009/11/21

라이선스 보기

Hist2D performs a fast calculation of 2D histograms. On a 2GHz processor, calculated and displayed a histogram of 1 million points in less than half a second.

HIST2D 2D histogram

[H XBINS YBINS] = HIST2D(D, XN, YN, [XLO XHI], [YLO YHI])
[H XBINS YBINS] = HIST2D(D, 'display' ...)

HIST2D calculates a 2-dimensional histogram and returns the histogram array and (optionally) the bins used to calculate the histogram.

Inputs:
D: N x 2 real array containing N data points or N x 1 array of N complex values
XN: number of bins in the x dimension (defaults to 20)
YN: number of bins in the y dimension (defaults to 20)
[XLO XHI]: range for the bins in the x dimension (defaults to the minimum and maximum of the data points)
[YLO YHI]: range for the bins in the y dimension (defaults to the minimum and maximum of the data points)
'display': displays the 2D histogram as a surf plot in the current axes

Outputs:
H: 2D histogram array (rows represent X, columns represent Y)
XBINS: the X bin edges (see below)
YBINS: the Y bin edges (see below)

As with histc, h(i,j) is the number of data points (dx,dy) where x(i) <= dx < x(i+1) and y(j) <= dx < y(j+1). The last x bin counts values where dx exactly equals the last x bin value, and the last y bin counts values where dy exactly equals the last y bin value.

If D is a complex array, HIST2D splits the complex numbers into real (x) and imaginary (y) components.

인용 양식

Amanda (2024). Fast 2D histogram calculation (https://www.mathworks.com/matlabcentral/fileexchange/25914-fast-2d-histogram-calculation), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0