Log Binning of Data

version 1.8.0.0 (1.6 KB) by LPS
Takes in data, and then produces data for a log binned histogram

2.6K Downloads

Updated 11 Mar 2011

View License

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:
http://www-personal.umich.edu/~ladamic/courses/si614w06/matlab/index.html

Modified by LPS July, 2010.

NOTES:
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.

Cite As

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
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!