From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

histogram bug??

I have a weird result from histogram to ask your help.
Simply, I find Histogram uses the     (range_min: range_max] and     [range_min: range_max) dynamically.

Attached is the test vi. Inside the program, the histogram is from 0:1 with 10 bins. The result will be changed when a number changed from 0.9 to 0.91, while it stays constant when changed between 0.2, 0.21.


0 Kudos
Message 1 of 5
(2,314 Views)

This looks fine to me. If a value falls right between the boundary of two bins, a decision needs to be made based on established statistical procedures.

You can open the front panel of the express VI and see what histogram index is calculated for each value:

Value 0.20: Fractional Index: 1.50000000000000000 -> rounded to bin index 2 
Value 0.21: Fractional Index: 1.59999999999999964 -> rounded to bin index 2
Value 0.90: Fractional Index: 8.50000000000000000 -> rounded to bin index 8
Value 0.91, Fractional Index: 8.59999999999999964 -> rounded to bin index 9

LabVIEW just follows the standard Nearest_integer_function where half-integers are always rounded to even numbers. This is statistically correct. Nothing wrong with that. 🙂

Message 2 of 5
(2,308 Views)
Altenbach do you ever sleep?
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 3 of 5
(2,304 Views)
altenbach people say that you know a lot of picture controls, any advice that you could pass on? check http://forums.ni.com/ni/board/message?board.id=170&message.id=244538
_____________________________________________________________________________________________
Dude LabView rocks.
0 Kudos
Message 4 of 5
(2,296 Views)
Thanks. It is right within its way. But it is a little out of my common sense.
0 Kudos
Message 5 of 5
(2,282 Views)