Importing Histogram bin width & bin frequency data without access to underlying raw data

1 view (last 30 days)
I have bin min/max and bin frequency data from a histogram, but I do not have access to the original data from which the histograms were prepared. What is the best way to format the data in a spreadsheet and then import it to MATLAB in a way that I can use the Distribution Fitter App? Currently I have the data in a series with column 1 being the bin max values and column 2 being the number of counts in that bin. For example below, a series of bins "x" 45 units in width, the first bin 510-555, the second bin 555-600, etc with the number of obsevations in the bin given in the second column "count":
X Count
555 15
600 22
645 49
690 81
735 104
780 133
825 162
870 182
915 192
960 158
1005 139
1050 97
1095 65
1140 52
1185 31
1230 10
1275 10
1320 3
1365 4
1410 3

Answers (1)

dpb
dpb on 13 Jul 2019
Just read the data in as is; no need for Excel. I'd use bin midpoints altho will make little difference on fitting is probably more intuitive in use. If the bin width is fixed at 45, subtract 22.5 from the max values.
  5 Comments
dpb
dpb on 13 Jul 2019
Edited: dpb on 13 Jul 2019
MATLAB is a general purpose programming language -- there are essentially no restrictions to what you can do numerically in the language itself and you can always call mex files in C/C++/Fortran to do whatever in regards to systems calls, etc., etc., that aren't possible in ML syntax itself.
IOW, if you can think of what it is you want to compute, in all likelihood ML will let you compute it...or at least to a proof of concept level.
Of course, ML can't compute something from what it doesn't have access to...if you need an estimator that can only be computed from the raw data (such as a recent Q? the person wanted to compare distributions via t-test having already reduced the data to means--that's just simply not a computable statistic without the observations; Matlab has nothing to do with it).
You've really not told us anything here to go on as any specific wish...other than mention distribution fitting. Some pieces of ML are based on Toolboxes outside the base product so how much appears to be builtin is dependent upon just what toolboxes you have.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!