Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 67219

Search array for 0 or 1 throughout

$
0
0

Hello. I have one column of data with 530,000 rows. The only values are either a 0 or a 1 (1 represents the occurence of an event; 0 does not). I'd like to be able to determine the amount of 0s in between each consecutive occurence of 1 throughout the entire array. For example, I'd like to be able to determine the number of zeros (i.e., rows) in between the first and second 1, the second and third 1, the third and fourth 1, etc, then determine the mean. Using the Search 1D array function makes it pretty easy to do for a few occurances, but I'm having trouble figuring out how to search through all 530,000 rows. Thank you in advance for your help.

 

Capture.JPG

 

 


Viewing all articles
Browse latest Browse all 67219

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>