This script takes in data, and then produces a logarithmically binned (natural log) histogram:
[midpoints,Freq,eFreq] =logbin(data, BinNum)
where the inputs are
data: the input data from some experiment which will be binned
BinNum: the number of bins used in the data reduction process.
The outputs are:
midpoints := the centre of each log bin
Freq := the number of counts in each bin
eFreq := This calculates the original relative Poissonian error before normalisation, then calculates the new error after normalisation.
One should note that this script is a slightly modified version of
'logbinfromlinbin.m' which can be found here:
Modified by LPS July, 2010.
This paper will be of use to some looking more deeply into the technique of using log bins in data reduction
"Sampling, log binning, fitting, and plotting durations of open and shut intervals from single channels and the effects of noise"
by McManus et al. 1987.
LPS (2022). Log Binning of Data (https://www.mathworks.com/matlabcentral/fileexchange/27176-log-binning-of-data), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!