Weighted Data Binning [wbin]

Weighted data binning.

Download
Download

You are now following this Submission

Cite As

Michael Lindholm Nielsen (2026). Weighted Data Binning [wbin] (https://au.mathworks.com/matlabcentral/fileexchange/34509-weighted-data-binning-wbin), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: wmean

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.12.0

(1) Implemented stronger condition on binning interval.
(2) Now capable of ignoring NaN values in X, Y and E.

Download
1.11.0

(1) Corrected weak condition on NaN error checking.
(2) Minor changes in code setup.

Download
1.9.0

(1) Changed while loop to for loop due to performance issues.
(2) Corrected error in selecting the correct weights.
(3) Corrected error in calculating mean position.
(4) Corrected error in preallocation.
(5) Added change log and example 2.

Download
1.4.0

(1) Corrected Binning Interval to: X <= X(1) + DX
(2) Position of bin is now calculated as a standard mean, since there is no uncertainty on the position (X).
(3) Added optional output: Number of elements used to calculate the respective bins.

Download
1.3.0

(1) Corrected Binning Interval to: X <= X(1) + DX
(2) Position of bin is now calculated as a standard mean, since there is no uncertainty on the position (X).
(3) Added optional output: Number of elements used to calculate the respective bins.

Download
1.1.0

Checks if X,Y,Z or DX contains NaN values.

Download
1.0.0

Download