bindata.m

버전 1.2.0.0 (761 KB) 작성자: Dan Chavas
Bins 2D data into desired (x1, x2) bins and returns arrays of mean/median + count within all bins
다운로드 수: 96
업데이트 날짜: 2017/1/20

라이선스 보기

File takes array of z data on 2D (x1, x2) grid, bins it into user-input bins, and returns arrays of mean/median + count within all bins. Example file plots data using imagesc.
Note: binning is achieved via for loops and could probably be sped up via vectorization, though attempts to vectorize the code seemed not able to avoid some error in dealing with e.g. boundary values, NaN values, mismatches between input data and bin ranges etc. Also vectorization is easy for the mean but does not seem possible (as far as I could tell) if other summary statistics are desired (e.g. median, which is included in this code).

인용 양식

Dan Chavas (2024). bindata.m (https://www.mathworks.com/matlabcentral/fileexchange/61225-bindata-m), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2015a
모든 릴리스와 호환
플랫폼 호환성
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.2.0.0

Old files got uploaded somehow accidentally in previous update attempt.

1.1.0.0

Fixed bug in xdata and ydata, which were transposed (and thus were vectors of constant value). Updated example script to use an offset from (0,0) and bin widths not equal to one as a better test of the code.

1.0.0.0

Added comments to bindata.m, uploaded a picture
Elaborated on code construction and reasoning for using loops for binning despite it being slower than vectorized code.