LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to count certain number of boolean values in array?

Solved!
Go to solution

I have a boolean array and want to find all the false values in the array. I then want to count how many of those false values are in the array and determine if that is <1% of the total values. Any suggestions on how to do this?

0 Kudos
Message 1 of 3
(1,808 Views)

Duplicate

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 3
(1,799 Views)
Solution
Accepted by LearningLabVIEW

Pass the Boolean Array through a "Negate" and then a "Boolean To (0, 1)" Node and the resulting array into an "Add Array Elements" node. I'm sure you can do the percentage calculation yourself.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(1,797 Views)