histogram

*To*: mathgroup at smc.vnet.net*Subject*: [mg2058] histogram*From*: michael.probst at uibk.ac.at (Michael Probst)*Date*: Sat, 23 Sep 1995 20:33:29 -0400*Organization*: University of Innsbruck, Austria

Hi ! I have a rather simple mma - question: What is the best (fastest) way to generate histograms ? That is: I have a list of data and I want to fill the data into another list which elements are zero at the beginning and are incramanted by one if the data is in the interval corresponding to the respective element of the second list which is just the histogram. I can use a Do[] but this seems clumsy: hist={0,0,0, .... }; Do[ ind=myindexfunction[data[[i]]]; hist[[ind]]=hist[[ind]]+1, {i,1,Length[data]}] Thanks a lot ! Michael michael.probst at uibk.ac.at