10-03-2013 08:09 AM - edited 10-03-2013 08:10 AM
Dear all,
I've been working on something where I need histograms but it seems to me that there is something wrong with the LabVIEW native VIs.
As an attachment, I send you an example I made to support what I'm saying.
I want the histogram to have 1000 bins with the minimum boundary equal to 0 and the maximum boundary equal to 1. The histogram is built from 500 random values.
The problem is that I cannot make the histogram to have the bins limited between 0 and 1, including 0 and 1.
Maybe I'm just interpreting something wrong but it would be interesting to have your feedback.
Thank you very much in advance!
Best regards!
Solved! Go to Solution.
10-03-2013 08:23 AM - edited 10-03-2013 08:26 AM
You should read the "detailed help" for the histogram function. The X values are the centers of the bins. For 1000 equally-spaced bins over the range of 0 to 1, the first bin goes from 0 to 0.001 (center 0.0005) and the last from 0.999 to 1 (center 0.9995). The histogram function is doing exactly what it is documented to do.
If you want your bins numbered from 0 to 1 inclusive, you need 1001 of them, over a range of -0.0005 to 1.0005.
Cameron
10-03-2013 08:32 AM
Dear camerond,
thank you very much for your clarification.
Best regards!