Mathematica Mathematica: Extracting histogram information

Click For Summary
The discussion focuses on extracting data from a histogram generated from random numbers. The user seeks to create a list containing the average value of each bin and the corresponding number of entries. They inquire whether using bincounts is the simplest method for obtaining the number of entries in each bin. The user confirms success in using bincounts and manually calculating the average bin values, indicating that their approach is effective.
Niles
Messages
1,834
Reaction score
0
Hi

I have a histogram of some numbers following a PDF, such as
Code:
Histogram[RandomReal[1, 100]]
What I want is to extract the information contained in this histogram in a list, i.e. get a list of the bin value (e.g. the average value it represents) and the number of entries in it. Is using bincounts the easiest way to obtain the number of entries? Then I guess I can manually find the average value of the bin.


Niles.
 
Physics news on Phys.org
I have succesfully used bincounts, and then manually found the average bin-value. So all OK!Niles.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
3
Views
5K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
15K
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K