LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine what percentage of a boolean array is true or false?

I'm trying to figure out how to take a boolean array and determine what percentage of that array is true. So far I can only really find the AND Array Elements Function as far as evaluating the array goes, and my Google searches haven't come up with anything helpful. Is there a way to do this on Labview?

0 Kudos
Message 1 of 4
(2,638 Views)

snip.png

 

Something like this should work.

 

mcduff

 

EDIT: Do the summation after the division, otherwise you can have an overflow error.

Message 2 of 4
(2,634 Views)

gonna go ahead and try that. Thank you so much!

0 Kudos
Message 3 of 4
(2,625 Views)

Count the number of True elements in the array.

 

Use that number and the array size to calculate the percentage that is true.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 4
(2,578 Views)